Author Topic: Recursive code replacements  (Read 199 times)

Offline Claude Diderich

  • Newcomer
  • *
  • Posts: 40
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Recursive code replacements
« on: March 03, 2025, 12:48:18 AM »
I typically use recursive code replacements to write captions. For example ($ being the my code replacement delimiter):

=s520228 one
!cpvm    $ competes in the men's pole vault on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}

When entering the code replacement $!cpvm$, I get the text $ competes in the men's pole vault on day $=s{year2}{mn0}{day0}$ of the {event} at {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}.
To get the full caption $ competes in the men's pole vault on day one of the Swiss Athletics Indoor Championships at Athletic Center St.Gallen on Saturday, February 22, 2025 in St. Gallen, Switzerland, I have to click on EVAL (Shift+OK).

It would be great if PhotoMechanics would recursively evaluate code and variable replacements!
Claude Diderich, sports photographer, member of AIPS and sportpress.ch
Mülibachstrasse 49, CH-8805 Richterswil, Switzerland, phone: +41 (44) 450 81 66, fax: +41 (44) 450 81 19, mobile: +41 (79) 450 81 66, e-mail: cdiderich@cdsp.photo, internet: http://www.cdsp.photo/