Macro Reporter Macro

Macro Reporter 3

This version of Macro Reporter improves on the initial release six ways:

  • It pops up a Please Wait window when invoked while it collect data.

  • It eliminates the Stats button, displaying a group's macros immediately when a new group is selected from the popup list.

  • It does not redraw the HTML window to report a new selection's macros.

  • It adds an estimated Time Saved report for each macro, expressed as hours:minutes.

  • Macro names can be clicked to execute if the context makes sense.

  • Headings for the Hot Keys and Time Saved columns have been added.

To do that, I broke up the original JavaScript action into two parts. The first part runs before the HTML window is displayed to create a JSON-formatted local variable of all macros. That's 192K on my system.

ss-256

That's a large variable but Peter Lewis has said, "Keyboard Maestro itself can have arbitrarily large variables." (See Why am I getting KM Engine Logs about Local Variables? - #3 by JMichaelTX) An issue would arise if the macro were reading that variable as an environment variable in a script (where it would be excluded), but it's not.

The second part is tucked into the HTML Custom Prompt to read the local variable of macros to find the group you selected and format the macro information in it for display.

USAGE

Macro Reporter lists your Active Groups followed by Inactive Groups in a popup. After you select one group, 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 triggers.

It does skip macros whose names include strings I use as titles 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 in the HTML Custom Prompt and edit it.

If the Group forms a palette, the table ends with the total the palette itself has been used.

Time Saved estimates are from Keyboard Maestro's data and are only rough approximates, more important as relative comparisons than absolute data.

Hovering over a macro name will turn it from white to yellow, indicating a click will execute it. But the group's activation settings matter as does what application is activated. Macro Reporter doesn't check any of that.

If you run the same Keyboard Maestro macros on multiple systems, the reports will vary from one system to another, showing the macro usage on each particular system.

That's it. Sweet and simple.

Macro Reporter 3.0a.kmmacros (12 KB)

UPDATE: This minor update to Version 3.0b adds a macro count to the status line of any palette report.

ss-353

The count may be higher than the number of displayed macros in the report if the palette includes titles or spacers. Hovering over the count will remind you with a text hint that this is the case.

Macro Reporter 3.0b.kmmacros (12.3 KB)

5 Likes