Never tried this before so not sure if this is a bug or just something that isn't possible. I have a script that runs several macros via Applescript in a ForEach loop. If I set the applescript to run with "Ignore Results" it works fine. However, if I set it to run asynchronously the scripts don't execute at all. The line where I do a getvariable to retrieve a the value of a variable from the current instance returns an empty string.
Attached is a slimmed down example (the disabled actions where me verifying my scripts could actually run asynchronously directly, they do). When run as is, the dialog that shows the instance id and the macroID will correctly show the instance id but the macroid is an empty string.
I can see this being caused by the time the Applescript has actually launched the main macro itself has ended so the Local variables no longer exist (i tried using Instance_ variables too but the same issue would apply, the main macro has ended so no Instance variables available).
If this is the case then I wonder if I accomplish this by putting a semaphore lock before launching the applescript, then doing an unlock in the launched applescript.
Test Execute Macro.kmmacros (5.5 KB)
Both test scripts I'm running do the same thing: pop up a window showing the start time of the script and the name of the script.