I'd like to create a macro that lists the macros inside a particular folder on KM. Is it possible?
The reason is that I often forget about the macros I have created for a particular app that that would come in handy. Then i could invoke from alfred "showmacros Wunderlist" and it will show me everything under folder Wunderlist.
I looked in the applescript dictionary for KM and it doesn't seem possible
Conventionally it's not, but it's hackable if you want to parse the KM macro plist file.
set pListPath to ((path to application support from user domain as text) & "Keyboard Maestro:Keyboard Maestro Macros.plist")
set macroGroupNameList to {}
tell application "System Events"
tell property list file pListPath
tell property list item "MacroGroups"
tell (first property list item where its text contains "Wunderlist")
set macroList to item 2 of (get value of property list items)
repeat with i in macroList
set end of macroGroupNameList to |name| of i
end repeat
end tell
end tell
end tell
end tell
macroGroupNameList
Note: You do know that Keyboard Maestro has it's own |List Macros by Name| action to list all macros available in the current app.
If you want to use lists in Keyboard Maestro more palettes and AppleScript I have an older post sitting here. It might be a good starting point to get a rough idea of what’s possible.