Apologies for resurrecting an old discussion, but I'm trying to understand why I'm not seeing the same results from these scripts as others are.
Simply put, I'm trying to use AppleScript to get the same list of groups as in the "Show Active Macro Groups" item in the KM menu. That result is specific to the foreground application — e.g., if I invoke it in Safari I will see the Safari group, and if I invoke it in the Finder I will get the Finder group, but not vice versa.
When I query "macro groups whose enabled is true" I get the enabled groups for all applications, not just the one in the foreground (and including ones that aren't even running).
Is there a way to write a script to get exactly the results as shown in the KM menu?