Tell which macro group a macro is part of

Question: is there a way to tell which macgrou group your macro is part of? Sometimes I search for a macro and then I find it, but I don't know which group it's a part of. Maybe you could create a "jump to macro" feature?

That would help me a lot (esp. if I'm trying to create group conditions).

By "folder", do you mean "macro group" ? It's subtle, but it's there:

It only shows up when you're not in the macro group to which the macro belongs, such as smart folders and search results.

1 Like

@CJK

Thanks, that's what I was looking for. Can't believe I missed that.

Maybe, as a suggestion to KM, it would help if it looked more like a button and was a bit bigger.

So I just went ahead and did that...

AppleScript code
use application "Keyboard Maestro"

tell the (selectedMacros) to if ((count) ≠ 1) then
	return
else
	set [UID] to it
end if

set M to the first macro whose id = the UID
select M's macro group
select M

image   Jump To Macro Group of Selected Macro.kmmacros (17.5 KB)

1 Like

Did you mean "macro group", since you have already found the macro?

If so, this simple AppleScript will do it:

tell application "Keyboard Maestro"
  set macroGroup to macro group of item 1 of (get selected macros)
  select macro group (name of macroGroup)
end tell

Just put this in an Execute an AppleScript action and enjoy!

1 Like

One more syntactic variation:

tell application "Keyboard Maestro"
   tell the (first macro whose selected is true)
      select its macro group
      select it
   end tell
end tell

-Chris

2 Likes

Thank you @ccstone, @CJK, and @JMichaelTX. All of your suggestions are helpful!