Then the action in red triggers this macro below where all actions are set to synchronous (is it how you say it, synchronous?)
So I will have a bunch of macros being triggered without depending on each other in the macro at the top (asynchronous), one of them being "Morning - Inbox Global", but then when it runs "Morning - Inbox Global", all the actions run in sequence, so each only runs when the previous action completes, right?
Yes, that's how you say it, and yes, that's how it works.
I hope you make use of Local and Instance variables in those macros, so they don't step on each other if they run asynchronously. I would guess you do, but I thought I'd mention it just in case.
Thanks for confirming.
Yes, I rarely use global variables, if ever.
And I still haven't used Instance variables at all. I guess my macros haven't needed them yet.
Yeah, they're not needed all that often. If you have a submacro you want to share values with, you might use instance variables. Other than that, probably not.
Is there a way to set macro groups to asynchronous without making them a submacro? Several actions don't have the option to be asynchronous and I'd like them to be to speed some things up that I would like to keep together but not wait for things to complete before another action runs.
Not, it's not an attribute of a macro or group, it's how you run them.
But I'm questioning why you want to do this. Honestly, it makes me think you're doing something wrong, or at least have some wrong ideas. Maybe you can explain more about what you're trying to do. Also, you should probably start a new thread for it.
If I understand you correctly you would like to have only one Macro instead of two Macros (Main & SubMacro) where you also want to have the ability that the nested Macro is able to wait at some Point for the Main Actor to reach a certain point where the asynchronous Macro will continue to run while the main Actor also does its work ?!
That’s doable though - but not easy run every Action of the asynchronous SubMacro in order inside an Execute AppleScript Action that is set to run asynchronous.
Caution : Be careful which tokens you use because not all are evaluating when they are set to communicate between native Actions and Scripts. Also be aware of the behavior of the Cancel Actions. Use them as if you are building two regular Macros instead of only one.
If you want to use Local and Instance Variables - I don’t know if that would work as it normally does when building a chain of more than one Macro, but I doubt that there’s any difference.
I have some Macros written like I described it here - but they are still using Global Variables. I haven’t had any case where I needed Local and Instance Variables yet.
To be honest, the vast majority of the time I use local variables is just to trim down the amount of space all those global variables take up. It is my understanding that it can slow down KM, although I can't remember the details.
I was referring to this specific case of Macros. I of course use Locat Variables most of the Time, too. Here and there are probably some Instance Variables, too but this scenario is a rare one. It depends on the Project I’m working on.
I'd love to see them I'm sure there's plenty of things that I'm missing. I didn't realize you could make variables out of actions. There's a ton of things. I still have to learn that you think I know by now. I also don't understand how you would call an Apple script within a macro asynchronously since there's no option to do that in the cogwheel thank you for the ideas and the reply.
As mentioned in the other thread, the option is in the "results" pop-up.
Have a read of the AppleScript action's Wiki page -- not so much for this (which you now know) but because of the sections on KM variables and also error handling.
Thank you, I hesitated to post that in two places, but since this thread kept going, I responded here as well. I am all straight on the AppleScript stuff now. I appreciate it.