Get Selected Macro UUID
Get Selected Macro UUID.v1.0.kmmacros (68.5 KB)
This macro is useful by itself, but it can also be used as a learning tool.
This macro returns the UUID (unique identifier) of the macro that is currently selected in the Keyboard Maestro editor. It does this via AppleScript, using Keyboard Maestro's automation calls.
It does NOT use the clipboard, as so many other macros do (including many of my own - at least, until now).
The included demo macro shows how to call this macro, and it also shows how to get the Name of the macro from its UUID, when the UUID is stored in a variable.
As with all my macros, feel free to ruthlessly steal from these as needed. After all, I stole - um, I mean - I learned most of this from others!