I used this in Macro Reporter, Rob, where it functions in an Execute for JavaScript for Automation
action as you have it here.
That causes the HTML window of that macro to redraw each time a new group is selected from the popup for a report in the text area below the popup. I've been trying to get around that by folding the JS into the HTML prompt.
But I keep tripping over things. I avoided the Application call (and the getmacros call) with a local variable created in the AppleScript that gets all the group names to begin with.
But then I run into ObjC not being available. Even when I load AppKit. So either I'm lost or it just can't be done.
Somehow I'd like to get from the local variable with the Keyboard Maestro plist XML of all the macros to the HTML list of the macros for the selected group without redrawing the HTML prompt (using a JS function in the HTML head).
Now that I've spun my blinded self around three times, can you point me in the right direction.
Here's as far as I've gotten:
Macro Reporter 2.0a.kmmacros (16.8 KB)