No code or example.
I just have a very generic question being can the variables set in one macro be passed to another macro without use of any hacked method requiring user input?
Example:
Macro A has set variables x, y and z
Macro B requires use of values of variables already set in Macro A
Thank you, that info is very helpful. The global variable route was something I'd already considered but I'm not really that fond of going that route for what I have in mind.
That said, the Subroutine sounds more in alignment as to what I'd like to do. Only problem is that the link you provided seems to present much more than of a summary as opposed to how it's used.
In version 10.0, Keyboard Maestro adds an explicit Subroutine trigger which lets you specify the parameters by name, and whether the macro returns a value via the Return from Subroutine action. Such subroutines are called with the Execute a Subroutine action.
Note that parameters are internally passed by index, so if you later change the Subroutine trigger, and add or remove parameters, or change the meaning of parameters, you will need to adjust the various Execute a Subroutine actions as well - you can get to them directly using the Callers menu in the trigger.
Which in most cases I've found summary info to be adequate enough for me to start a venture except pulling in a "Execute a Subroutine" action into my macro doesn't appear to provide much of anything for me to manipulate. Option of none is the only option so it seems a tad confusing.
Thanks, I've been dabbling around with the trigger options and noted the subroutine with parameters option so I believe I'm slowly grasping the concept in KM logic but I'll definitely review those example links you provided as well.
I figured it out just seconds after my last response. Basically to accomplish what I want; setting any macro as a subroutine appears to be easily accomplished by setting the trigger type to "Executed as a subroutine with parameters"
I can then pass the variable of the main macro to the subroutine as a parameter.
I'm thinking I could just as easily pass the variable as a collection if I wanted to pass more than a few but this is fantastic and just what I needed.