I am not looking for a one time solution. I often have this problem, and would like to be able to do so with a global macro which I would trigger → would ask me for the UUID → navigate to the macro.
Your macro is great !! Thanks you so much.
I really don't like any solution involving the editor's search field. Too slow and cumbersome based on my past experience but that's probably because I'm a bungler.
Thanks again VERY much !
I wonder if a variant of your macro could fulfill another need, namely a macro search for macro based on the name limited to a specific macro group instead of the trillion macros in the user's KM editor.
It's what I have been requesting for years because palettes (like my global macro group palette) become enormous.
The group could be hard encoded in the Apple Script, meaning that one macro would specifically search for example the global macro group, and another macro another group.
It would be too tedious in terms of user workflow and defeat the purpose imo if the input included asking the user for the name of the macro group or asking the user to pick from a dropdown list.
Just for posterity – here's how you'd go about that.
The Keyboard Maestro Editor needs to be open, otherwise it will be opened.
--------------------------------------------------------
# Auth: Christopher Stone <scriptmeister@thestoneforge.com>
# dCre: 2023/06/02 00:11
# dMod: 2023/06/02 00:11
# Appl: Keyboard Maestro
# Task: Return the Name of Macros Whose Name Contains a Given String in a Given Macro Group.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Keyboard_Maestro, @Name, @Macros, @Contains, @Macro_Group, @String
--------------------------------------------------------
set macroNameStr to "generic"
set macroGroupName to "Test Group.ccstone"
tell application "Keyboard Maestro"
set macroNameList to name of macros of macro group macroGroupName whose name contains macroNameStr
end tell
set AppleScript's text item delimiters to linefeed
return macroNameList as text
--------------------------------------------------------