Macro Reporter Macro
Latest Version: Macro Reporter 3.0d 6 December 2023
Macro Reporter 3.0d.kmmacros (12.5 KB)
I've gotten so used to looking up my text expansions and their triggers in Brevis that I wanted something like that for my non-text expansion macros. And here it is.
There are a few macros posted here that do something like this and I borrowed heavily from them. The AppleScript to make lists of active and inactive Macro Groups is derived from @ccstone while the JavaScript that mines the group for macros, times used and triggers is predominantly from @ComplexPoint with a dash of JMichaelTX (for the triggers). The bugs are all mine, though.
It does the job but I wish I had been able to figure out:
- How to fold the JavaScript into the Custom HTML Prompt so you wouldn't need a
Stats
button. You'd just pick another Group from the popup and the report would change instantly, no redrawing the HTML window. I tried, but I got an "Can't find variable: Application" error in the JXA. [Solved in v3 below in this thread.]
Anyway, as it is, Macro Reporter shows all you Active Groups followed by Inactive Groups in a popup. After you select one and click the Stats button, the scrollable report window fills with a table that shows the Group and whether or not it is enabled followed by its individual macros with their times used, enabled status checkbox, name and trigger.
It does skip macros whose names include a string I use to delineate sections of macros in palettes. Those include consecutive hyphens, rules and spaces between each letter. If that's a conflict on your setup, search for "regex" in the JavaScript and edit it.
If the Group forms a palette, the table ends with the total times the total times the palette has been used. I think.
That's it. Sweet and simple.
Macro Reporter.kmmacros (16 KB)
UPDATE: I eliminated the Stats button in this version with a simple on change observer in the HTML. And I added a Wait window while the macro is gathering information. But look down a few posts for v2.0 of the macro, which eliminates the HTML window redraw as well, making a much smoother and faster experience.
Macro Reporter.11c.kmmacros (18.7 KB)
UPDATE: Version 3 of Macro Reporter, which can execute macros and gives a time-saved report, is available below.
UPDATE: Version 3.0d of Macro Reporter cleans up the palette report at the bottom of the display.