Author Topic: Code Replacement litte more  (Read 4881 times)

Offline Ziggy487

  • Member
  • **
  • Posts: 54
    • View Profile
Code Replacement litte more
« on: April 22, 2012, 06:29:38 AM »
First off, I love Code replacement.  Saves tons of time.

Don't know if it is possible, but when I type in the code say pp = Philadelphia Flyers, but after I use that in the caption, i would then need to go down to Supp Cat 2 and enter, [Philadelphia Flyers], would it be possible to when I type \pp\ I could get Philadelphia Flyers  in the Caption and [Philadelphia Flyers] in the Supp Cat 2 section.

Hope this makes sense

Thanks again

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24731
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement litte more
« Reply #1 on: April 22, 2012, 07:32:06 AM »
No, that is not possible.  It has been requested before, but would be difficult to implement.  Code Replacement knows nothing about the individual fields in all of the various dialogs.

-Kirk

Offline Ziggy487

  • Member
  • **
  • Posts: 54
    • View Profile
Re: Code Replacement litte more
« Reply #2 on: April 22, 2012, 08:13:07 AM »
Thanks for letting me know. I figured, but had to ask

Keep up the good work

Offline TiggerGTO

  • Member
  • **
  • Posts: 95
    • View Profile
Re: Code Replacement litte more
« Reply #3 on: May 03, 2012, 07:45:16 AM »
You could easily accomplish this with stationery pad.  It's been a while since I have shot soccer, but I used to go through my pictures and type shorthand IDs for the players in one of the fields (i.e. initials or jersey numbers).  After making a pass to put the ID in all my selected pictures, I would apply the stationery pad to all of them.  I had it set up so that it would expand the shorthand one way for the caption and another way for the keywords.  If I remember correctly, my code replacement file would have something like cIDX would be the caption replacement for player with IDX and kIDX would have the keyword(s) for player with IDX.  Then the stationery file would have /c{field}/ in caption and /k{field}/ in keywords where {field} was the field where I typed the player ID.  I would use a field I really didn't care about like Object Name or Category.

I'd have to go back to verify that I am remembering this correctly, but it worked well for my purposes.  I'm sure Kirk could explain how to make this work.

Hope this helps,
Danny

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24731
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement litte more
« Reply #4 on: May 03, 2012, 10:40:40 AM »
Danny,

You could easily accomplish this with stationery pad.  It's been a while since I have shot soccer, but I used to go through my pictures and type shorthand IDs for the players in one of the fields (i.e. initials or jersey numbers).  After making a pass to put the ID in all my selected pictures, I would apply the stationery pad to all of them.  I had it set up so that it would expand the shorthand one way for the caption and another way for the keywords.  If I remember correctly, my code replacement file would have something like cIDX would be the caption replacement for player with IDX and kIDX would have the keyword(s) for player with IDX.  Then the stationery file would have /c{field}/ in caption and /k{field}/ in keywords where {field} was the field where I typed the player ID.  I would use a field I really didn't care about like Object Name or Category.

I'd have to go back to verify that I am remembering this correctly, but it worked well for my purposes.  I'm sure Kirk could explain how to make this work.

Yes, users do use Code Replacement in the manner you described as a multi-pass operation, but the request is to have it such that when one uses CR in one field it causes another 'related' field to be modified as well.  Your method will accomplish the same thing but requires a bit more effort in preparation (stowing a code in an unused field and then using the IPTC Stationery Pad to cause replacement in multiple fields.)

The requested feature is not implementable in a general sense.

-Kirk