MACRO: Get Current Macro Info

#Macro Library Get Current Macro Info

###For the macro that is currently selected in the KM editor, returns the name and UUID of both the macro and its group.

Requires OS/X Yosemite or later.

Get Current Macro Info.v1.0.kmmacros (7.6 KB)


I may have already posted something like this, or perhaps someone else has, but whatever - someone asked for it, so I thought I'd make sure it was posted here.

Call this macro, or better yet, just copy the green Group below, and execute it. The results are returned in these variables:

  • gcmiMacroUUID
  • gcmiMacroName
  • gcmiGroupUUID
  • gcmiGroupName

1 Like

Thanks, Dan. Looks very useful.

Any chance you could add the info from the standard KM "Get Info" (⌘I) to your report?
EDIT: "⌘I" is the Hot Key Trigger I assigned to a Macro, which simply shows menu KM App > Window > Macro Inspector.

Then we wouldn't need the KM version. :smile:

Something simpler for just the group name?

Well, almost all of the JXA code needs to be there, in order to get the group name. So it really doesn't matter if it gets all those fields or not. You can either ignore the other variables, or just delete the lines at the end that store the unwanted results in the KM variables.

LOL. One person wants less, one wants more. :slight_smile:

I don't really want to figure out how to decipher dates. Perhaps @ComplexPoint wants to tackle that?

No problem. It is not a critical need.

How about parsing the output?