Globally change target application?

Is it possible to change all macro references to a certain application to a different version of that application?

All our current macros reference “Adobe Illustrator CC 2015.3” and we will soon be moving to “Adobe Illustrator CC 2018”. Most macros will be compatible with either version (especially those using the “Open Document” action), but changing the target app could be very tedious.

This is the macro I was concerned about (about 50 "Open with" actons). I realized after posting my question that I should convert the Illustrator file name to a variable and create one "Open with" action after the "Switch" action.

Just learning.

There is no direct way in Keyboard Maestro.

The only way would be to export the XML and manually change it and then re-import it (or you can also do that via AppleScript but for a one off, it is probably easier to do in BBEdit).

Actually, I think this would be fairly easy to do using AppleScript to read and change the XML of each "Open with" Action.

For example, here is the XML of one such action:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
    <string>Script Debugger 7</string>
    <string>/Applications/Script Debugger</string>
  <string>/Users/Shared/Dropbox/SW/DEV/KM/Test/@JMichaelTx's Speed of JavaScript Execution Test for Safari &amp; Chrome.scptd</string>

You can see that you would need to change only a few <string> values to change the application.

I have a test script that will loop through all Actions in a Macro. When I get a few minutes I'll take a look at doing this.

1 Like