How to use Variable for application in "Open" action?

I use an "Open" action in many places throughout my macro group and find updating the "application version" very tedious. Can I convert the "target application" to a variable that can be changed in a single location?

image

I don't believe you can directly. But, if you create a "library" macro like this:

You can then call it from your main macro like this:

So that when the app version changes, you only have to change it once in your "library macro".

Would that work for you?

2 Likes

@tiffle, I'm certain it would. I just have to learn about "Macro Libraries". Thank you for the response!

There's no such thing as a "macro library" except as a category in this forum. What I mean is just a macro that you would never use by itself but would execute from another macro - a bit like a subroutine, if you know what that is.

I have a macro group in KM that I call "LIBRARY" where I keep useful macros that provide useful functions I can use all over the place - like array manipulation, text processing functions etc. If ever I'm writing a macro that needs one of these functions I just execute it with the right parameters.

Sorry for wittering on!

No, that's fine. I use subroutines all the time. Because I share macros with a team of 5 other artists I try to limit my "groups" to one so links are not lost when sharing updates. I'll try your suggestion.

That works! You've saved me a lot of time and taught me something new. Thank you!

1 Like

We generally call those "Sub-Macros", which is an unofficial terms that refers to Macros called via an Execute Macro Action.

1 Like

Perfect! Thanks!