When I saw @ComplexPoint's N Most Recent Macros macro this morning, I knew I wanted to have its output in an HTML prompt window, where I could easily run or edit any of the listed macros.
After some ugly get-it-done brute force work, and some help from a couple LLMs with the fixed-header scrollable table, here's the result:
This is 100% full credit to @ComplexPoint! I couldn't ever have written what he wrote; I just used his macro and forced his output into the format I wanted to use it in. Kudos, Rob, for a very slick bit of code!
Macros are always disabled when imported into the Keyboard Maestro Editor.
The user must ensure the macro is enabled.
The user must also ensure the macro's parent macro-group is enabled.
System information
macOS 14.7.1
Keyboard Maestro v11.0.3
Click the buttons at the top to choose between which set of macros to view, and that's the extent of the interface :). Note that this is not updated in real time when you click the buttons: I call @ComplexPoint's macro three times when the macro launches, then just display those results. To update the lists, you need to run the macro again.
There is only one variable in the macro, the green box near the top where you can set the number of macros to retrieve.
There are a ton of inefficiencies in this macro: I just call the JavaScript three times, instead of trying to muck through changes to make it get all three data sets in one go. I didn't try to delete the line of text that's added in the JavaScript; I just regex it out afterwards. The HTML could be written on the fly in the JavaScript. And the list goes on..........
But it works, and it didn't take me that long to put together. If anyone wants to optimize the thing, have at itâplease!
it also puts out a list, maybe that list could be implemented into your solution...
no biggie in any event.... really...
Thanx for your time and expertise Rob
Cheers
Based on a quick look, the time format is different, so that would require handling in some way. But if there were a Sort button on the one I wrote, then you could sort Used in reverse order, and wouldn't that get you unused?
Yes, as long as it was showing all macros and not just a sub-set of them. (ie. just the last 20)
I would need to know that all macros were in the list then yes, if I was able to 'reverse' sort them, that would do the trick! -
2024-11-29 14:18:53 Execute macro âBrowse lists of recent macrosâ from trigger Editor
2024-11-29 14:18:55 Action 16462339 failed: Execute a Subroutine action failed to find the macro to execute
2024-11-29 14:18:55 Execute a Subroutine action failed to find the macro to execute. Macro âBrowse lists of recent macrosâ cancelled (while executing Format recently-created macro list).
If anyone downloaded before seeing this post, please download again: The original upload was missing the subroutine macro. All fixed now in the download link in the first post.
I've uploaded a new one that gets rid of the text window (debugging step left active)âyou can fix by just deleting the Display Text action after the three purple subroutine calls in the main macro if you don't want to re-download.
As for the display, I'm stumped: I downloaded the uploaded macro onto two Macs that had never seen it before, and it worked fine on both. What macOS and Keyboard Maestro version are you on?
I would guess it's something about the name, a character that's messing up the HTML somehow. I'm not actually filtering the names for HTML characters, so that's possible. If you find out which one it is, please let me know.
Thanks to an LLM that will rename nameless, here's a version that includes sortable columnsâthis feature is 100% none of my work, but it seems to work in testing.
Cool macro, @griffman. Thanks for sharing. I'll be using it for sure.
I've shared a macro with intersecting features. With my macro, everything is based off the executed date. Also, one of the key objectives was to quickly edit (or run) a recently used macro without taking my hands off the keyboard. Of course the amazing Prompt With List action is a great tool for that job.
One common characteristic with your macro is that it includes some of @ComplexPoint's adapted JXA.
I actually started this one with a Prompt With List, but I wanted to include the macro group and detailed date, and you can't align text in a Prompt With List. Hence the switch.
What I really want is Prompt With List With HTML and CSS Table Support :).
I am trying to eliminate by running the report and changing macros that have been used but can't seem to find a rhyme or reason...
Although I am sure there is one....
NOTE:
I Think this name is stopping it
z Mod Multi Tick ` x 1
NOTE:
Yes, the ` was cause up to this point.... I removed it and now I'm counting up to see if I can get a list of all 2700 macros (down from 3300!).....
Progress not perfection.... one step at a time...
Yup - it did it, all 2,760 of them. I just 'scroll' to the bottom and I can start working with removing the 'never used / oldest usage' macros....
you ROCK....
and also @ComplexPoint !!!! THANK YOU.... good stuff man....
cheers