Author Topic: Move cursor to the first code replacement delimiter character  (Read 259 times)

Offline Claude Diderich

  • Member
  • **
  • Posts: 79
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Use case
I have currently defined "generic" code replacement codes, like the following one:
Code: [Select]
CT    Players of team = celebrate after winning the men's preliminary round group A ice hockey match between Switzerland and Czechia on day =&D{iptcdate}= of the Milano Cortina 2026 Winter Olympic Games at the Milano Santagiulia Ice Hockey Arena on {dow}, {monthname} {day}, {year4} in {city}, {country}
When I now enter =CV= in the caption field, the cursor is put at the end of the replaced caption text (i.e., after {country}). It would be great if the cursor could be put just after the first code replacement delimiter character = so that I could directly enter the team country code replacement code, rather than have to move the cursor there.

Feature request
After executing a code replacement, move the cursor just after the first code replacement delimiter character (rather than at the end of the text) or at the end of the text if there is none.
Claude Diderich, sports photographer, member of AIPS and sportpress.ch

Offline ulrik

  • Full Member
  • ***
  • Posts: 147
    • View Profile
Re: Move cursor to the first code replacement delimiter character
« Reply #1 on: March 28, 2026, 04:15:00 AM »
In your specific case it would be easier to have two code replacement CS for Switzerland and CC for Czechia.

But your point is relevant as people use photo mechanic in different ways. I suggested a million things but I think I suggested being apple to do some coding. Here find find first = but it could be probably be useful for many. If you after entering the country want it to jump to persons I assume that could be coded.

But probably too complicated with a programme like that.

I also suggested recipies so for example you choose automatic ingest, enter start of file name (with automatic sequence variable added) which could be CS (then your dont have to enter the above as it just takes the data from your file number) and  then it jumps to where you enter player names, then to crop and then it uploads. That would be fairly quickly........

Offline Claude Diderich

  • Member
  • **
  • Posts: 79
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Re: Move cursor to the first code replacement delimiter character
« Reply #2 on: March 29, 2026, 03:00:41 AM »
Note that there may be more complex situations, where enumerating all possible options is not the best way to do it, like in
Code: [Select]
CR  Fans react after the performance of = during the figure skating men's short program of the Milano Cortina 2026 Winter Olympic Games at the {location} on {dow}, {monthname} {day}, {year4} in {city}, {country}
Claude Diderich, sports photographer, member of AIPS and sportpress.ch

Offline Claude Diderich

  • Member
  • **
  • Posts: 79
  • Claude Diderich
    • View Profile
    • Claude Diderich Sports Pictures
Re: Move cursor to the first code replacement delimiter character
« Reply #3 on: March 31, 2026, 04:37:03 AM »
An alternative could be to define four key shortcuts: 1) jump to the first replacement delimiter, 2) jump to the next replacement delimiter, 3) jump to the previous replacement delimiter, 4) jump to the last replacement delimiter in the current field.
Claude Diderich, sports photographer, member of AIPS and sportpress.ch

Offline MYanow

  • Newcomer
  • *
  • Posts: 9
    • View Profile
Re: Move cursor to the first code replacement delimiter character
« Reply #4 on: April 14, 2026, 04:39:40 PM »
I have been wanting this for a while now. My workflow is to keep the caption field empty on ingest. When captioning, I just start typing the athlete's name followed by their action using code replacement, i.e. "celebrates," then end with =1=.

Before each game/match/event, I create all the possible endings of the sentence and make them available in code replacement. I make sure the code replacement is short and easy to type to save time.

In your case, =1= means "after winning the men's preliminary round group A ice hockey match between Switzerland and Czechia on day =&D{iptcdate}= of the Milano Cortina 2026 Winter Olympic Games at the Milano Santagiulia Ice Hockey Arena on {dow}, {monthname} {day}, {year4} in {city}, {country}."

This way I never have to hunt around looking for my delimiter. I know every time where my cursor is in the caption field.

=s32= celebrates with teammates after winning the men's preliminary round group A ice hockey match between Switzerland and Czechia on day =&D{iptcdate}= of the Milano Cortina 2026 Winter Olympic Games at the Milano Santagiulia Ice Hockey Arena on {dow}, {monthname} {day}, {year4} in {city}, {country}.