Keyboard Maestro's global variables are accessible from all macros and are persistent across invocations. If you keep the last macro number in a global variable, you can retrieve it and increment it in any of your macros.
To preset the variable, create a new variable in KM's Variables preference pane and fill it with your current highest number.
As for figuring out where the holes are in your numbering system, I think that could be done via AppleScript, but there may be an easier way.
Woof! Such a simple solution, awesome. The only catch is that I work on 6 to 10 different computers. So I guess I’ll just create a macro named next macro number and put the number in the title of the macro and that’ll be synced to all the computers. How simple!!
Awesome solution, thank you!
Hey @DanThomas , really want to say how appreciative I am of your time and expertise on this forum, really excellent stuff my friend..... seriously, thank YOU.
ok, yeah, they are always at the end of the macro name ie.
Multi ⇧⌥ Space Shift Option Time - Set K0345
Kens ⌃⌘ Scroll Up Cnt Cmd VARIABLE K0099
Multi Kens Global ⌘+⌻B4 Cmd B4 VARIOUS K0027
Multi Left ⌘ Command VARIOUS K0010
the word 'various' is not always in the title, but definitely the last 5 characters of the macro name are always Kxxxx
Run it, and give me the results - not all of them, just 10 or 20 lines. You can pick and choose which lines to post, if there are names you don't want to share. Just don't alter the lines you do share.
"Multi Kens FMP ⇧⌃⌥⌘+B2 ShConOptCom VARIOUS 0012"
"Multi Kens FMP ⇧⌃⌥⌘+B4 ShConOptCom VARIOUS K0013"
"Multi Kens FMP ⌃⌥⌘+B2 ConOptCom VARIOUS K0019"
"Multi Kens FMP ⌃⌥⌘+B4 ConOptCom VARIOUS K0014"
"Multi Kens Global ⇧+B2 Shift VARIOUS K0005"
"Multi Kens Global ⇧⌃+B2 Shift Control VARIOUS K0006"
"Multi Kens Global ⇧⌘ ShCom Scroll Up VARIOUS K0026"
"Multi Kens Global ⌃+B2 Control VARIOUS K0007"
"Multi Kens Global ⌃⌥+B2 Cnt Opt VARIOUS K0028"
"Multi Kens Global ⌘+⌻B4 Cmd B4 VARIOUS K0027"
"Multi Kens Global ⌘+B2 Cmd B2 VARIOUS K0029"
"Multi Kens Global ⌥+B2 Option VARIOUS K0008"
"Multi Kens Global ⌥+B4 Option Button 4 VARIOUS 009"
"Multi Kens Global ⌻B2 VARIOUS K0021"
"Multi Kens Global ⌻B4 USE VARIOUS K0017"
"Multi Kens Global Cnt Cmd B2 VARIOUS K0015"
"Multi Kens GlobalCnt Cmd B4 VARIOUS K0016"