Author Topic: Macro actions  (Read 4489 times)

Offline Joel Goodman

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Macro actions
« on: March 30, 2019, 01:24:54 PM »
I'd love to be able to carry out a sequence of actions, based on existing snapshots, in a single action.

EG I have a set of photos which need different caption and meta templates applying for different uses. Once written, I don't want to change the body of the captions in the sequence, or the keywords, but I need to carry out two find+replaces in the caption, a find and replace in the keywords and apply an overwrite IPTC template for a chunk of fields.

It's the same actions, each time.

If I could programme a sequence of find/replace preset/s and IPTC template application/s in to a single action, that'd save a lot of time for tasks that I do repeatedly throughout the day.

Is this feasible?

Ta

Offline Kevin M. Cox

  • Sr. Member
  • ****
  • Posts: 479
  • PM 6 (6645) | macOS 12.6.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Re: Macro actions
« Reply #1 on: March 30, 2019, 04:23:21 PM »
Joel, any chance you could accomplish this with code replacements?
Kevin M. Cox | Photojournalist
https://www.KevinCox.com

Offline Joel Goodman

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Macro actions
« Reply #2 on: March 30, 2019, 04:34:08 PM »
Hi Kevin,
Trying to figure out how that would work.
I have a set with written captions and IPTCs ready for one destination. I send them.
Now I wish to change two elements - one at the start and one at the end - of the captions and one element of the keywords, plus overwrite several other fields with a new template, to make the captions and IPTCs of the set suitable for another destination, to send out to that destination.
I can see code replacements automatically populating that info under defined circumstances, but not rewriting them all in one action, after.
Have I missed something?
Ta

Offline Kevin M. Cox

  • Sr. Member
  • ****
  • Posts: 479
  • PM 6 (6645) | macOS 12.6.1
    • View Profile
    • Kevin M. Cox | Photojournalist
Re: Macro actions
« Reply #3 on: March 30, 2019, 04:41:40 PM »
Ah gotcha, I misread "applying for different uses" as "different users" and thought you are trying to set different credits/names of photographers.
Kevin M. Cox | Photojournalist
https://www.KevinCox.com

Offline Joel Goodman

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Macro actions
« Reply #4 on: March 30, 2019, 04:43:19 PM »
No worries, thanks for trying.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24382
    • View Profile
    • Camera Bits, Inc.
Re: Macro actions
« Reply #5 on: March 30, 2019, 05:48:04 PM »
Might this be accomplished with a macro recorder that you can use to play back your repetitive actions?

-Kirk

Offline Joel Goodman

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Macro actions
« Reply #6 on: March 31, 2019, 10:06:24 AM »
Thanks Kirk, worth a play. Guess it's not something you guys are exploring then?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24382
    • View Profile
    • Camera Bits, Inc.
Re: Macro actions
« Reply #7 on: March 31, 2019, 10:35:43 AM »
No, there are numerous macro recorder applications out there that do a great job already.

-Kirk

Offline Joel Goodman

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Macro actions
« Reply #8 on: October 10, 2022, 02:43:29 PM »
Dredging this back up as I've been trying something out with Macro Recorder.

I've hit two issues which I hope someone can help with.

1) PM6 intermittently crashes when I run fast sequences of actions. I've told Macro Recorder to run as slowly as it can and that has reduced the instances a bit, but it's still regular. Plus this undermines the benefit.

2) I can't find keyboard shortcuts for some actions - EG the preset lightening bolt button. I've worked around this with tons of tab presses in the find/replace window but it can't be reached via tab in the Metadata (IPTC) Template window, for instance.

Any ideas on these?

One final thought: if not a native macro function, could we have AND/OR options within find/replace?

Thx

Joel.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24382
    • View Profile
    • Camera Bits, Inc.
Re: Macro actions
« Reply #9 on: October 10, 2022, 02:59:38 PM »
Joel,

Dredging this back up as I've been trying something out with Macro Recorder.

I've hit two issues which I hope someone can help with.

1) PM6 intermittently crashes when I run fast sequences of actions. I've told Macro Recorder to run as slowly as it can and that has reduced the instances a bit, but it's still regular. Plus this undermines the benefit.

What actions are these that you are running in sequence?

2) I can't find keyboard shortcuts for some actions - EG the preset lightening bolt button. I've worked around this with tons of tab presses in the find/replace window but it can't be reached via tab in the Metadata (IPTC) Template window, for instance.

Not all buttons have keyboard shortcuts.  The snapshot buttons do not.

One final thought: if not a native macro function, could we have AND/OR options within find/replace?

What does this mean?  You need more power than what regular expressions (grep) offers?

-Kirk

Offline Joel Goodman

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Macro actions
« Reply #10 on: October 10, 2022, 03:20:52 PM »
Joel,

Dredging this back up as I've been trying something out with Macro Recorder.

I've hit two issues which I hope someone can help with.

1) PM6 intermittently crashes when I run fast sequences of actions. I've told Macro Recorder to run as slowly as it can and that has reduced the instances a bit, but it's still regular. Plus this undermines the benefit.

What actions are these that you are running in sequence?

Keyboard : ControlLeft : KeyDown
Keyboard : ShiftLeft : KeyDown
Keyboard : F : KeyPress
Keyboard : ControlLeft : KeyUp
Keyboard : ShiftLeft : KeyUp
DELAY : 500
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
WAIT FOR : Photo Mechanic : appear : 0 : 0
DELAY : 500
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
WAIT FOR : Photo Mechanic : appear : 0 : 0
DELAY : 500
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
WAIT FOR : Photo Mechanic : appear : 0 : 0
DELAY : 500
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
WAIT FOR : Photo Mechanic : appear : 0 : 0
DELAY : 500
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
WAIT FOR : Photo Mechanic : appear : 0 : 0
DELAY : 500
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Up : KeyPress
Keyboard : Up : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
WAIT FOR : Photo Mechanic : appear : 0 : 0
DELAY : 500
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Up : KeyPress
Keyboard : Enter : KeyPress
Keyboard : Tab : KeyPress
Keyboard : Enter : KeyPress
WAIT FOR : Photo Mechanic : appear : 0 : 0
DELAY : 500
Keyboard : Enter : KeyPress
Keyboard : AltLeft : KeyDown
Keyboard : F4 : KeyPress
Keyboard : AltLeft : KeyUp
DELAY : 500
Keyboard : ControlLeft : KeyDown
Keyboard : I : KeyPress
Keyboard : ControlLeft : KeyUp
Keyboard : ControlLeft : KeyDown
Keyboard : AltLeft : KeyDown
Keyboard : A : KeyPress
Keyboard : ControlLeft : KeyUp
Keyboard : AltLeft : KeyUp


2) I can't find keyboard shortcuts for some actions - EG the preset lightening bolt button. I've worked around this with tons of tab presses in the find/replace window but it can't be reached via tab in the Metadata (IPTC) Template window, for instance.

Not all buttons have keyboard shortcuts.  The snapshot buttons do not.

One final thought: if not a native macro function, could we have AND/OR options within find/replace?

What does this mean?  You need more power than what regular expressions (grep) offers?

-Kirk

I don't know about this - can you point me towards a guide?
What I'm asking is, if I could define a selection of things in the Find field -
"A THING" OR "B THING" OR "C THING"
so that I could swap any of A, B or C to the same replace statement, that'd be very cool.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24382
    • View Profile
    • Camera Bits, Inc.
Re: Macro actions
« Reply #11 on: October 10, 2022, 03:42:08 PM »
Joel,

One final thought: if not a native macro function, could we have AND/OR options within find/replace?

What does this mean?  You need more power than what regular expressions (grep) offers?

I don't know about this - can you point me towards a guide?
What I'm asking is, if I could define a selection of things in the Find field -
"A THING" OR "B THING" OR "C THING"
so that I could swap any of A, B or C to the same replace statement, that'd be very cool.

This may be of help: https://www.marksanborn.net/howto/learning-regular-expressions-for-beginners-the-basics/

There are entire books written on regular expressions.  They're very powerful, but unfortunately somewhat cryptic.

You can definitely search for patterns, partial matches, alternating sequences, etc.  You can capture matches and use them in replacements.

HTH,

-Kirk