Can't use Applescript to call a Macro

There's another thread about this but I'm not sure if I should be adding to that or creating a new one (it didn't look resolved). I have an extremely simple problem. I just want a macro named Test1 to call a macro names Test2 which rings a bell. Here's Test1:

And here's Test2:

When I execute Test1, nothing happens. They are both in the Global Macro Group. I did read the KM manual and searched the internet for any example of how to successfully invoke a macro with Applescript, and I did read those search results, but couldn't find anything to help me fix this. I won't be upset if you call me an idiot for not knowing how to do this. As long as you find my problem you can call me anything you want. :slight_smile:

It does work if I replace the string Test2 by that 32 character UUID. The only failure is when I use the name of the Macro. Please note that important fact.

And once this works, I want to be able to pass a $KMVAR_varname to the Execute AppleScript action. Otherwise I don't really care to get this fixed because none of this will help me.

The second part of my question can be answered like this:

But the main question in my post still needs a solution.

I didn’t mention it, but using the Execute AppleScript action is my requirement, I can’t use Execute Macro because, as indicated in the second half of my question, the name of the Macro must be a variable.

In the first action, change it from ignoring the results to displaying the results in a window - that will likely provide some enlightenment.

My guess is that you have another active macro with the Test2 name, and so Keyboard Maestro does not know which one to trigger.

Dang good guess! Good grief!

The important take-away here is: if an action is failing, and it is ignoring the results, display them. This is especially important for scripts (AppleScripts, Shell Scripts, etc).