KBM search box syntax and shortcuts for history navigation

Hello,

I can't find

1- the KBM search box syntax rules (example: enabled:) Can I restrict the search to a macro group ?

2- if there are shortcuts which allow me to move forward and backward (as per menu in screenshot) in History (which I am constantly doing, and clicking each time is quite tedious)

thanks very much

See Search Qualifiers .

I don't know of any shortcuts for these, but let's ask @peternlewis.
If there are none:

  1. @peternlewis, please consider this a request to add shortcuts for ALL of the tools on the KM Editor toolbar.
  2. As a workaround, we might be able to write an AppleScript, which we could use in a KM Macro with a hotkey.
1 Like

Following up on @JMichaelTX's response, I've run into this same problem myself, so I already have a couple of macros that run AppleScripts for just this purpose. Just copy and paste each of these into an Execute an AppleScript action:

Back Button

tell application "System Events"
	tell application process "Keyboard Maestro"
		tell front window
			tell group 4
				click button 1
			end tell
		end tell
	end tell
end tell

Forward Button

tell application "System Events"
	tell application process "Keyboard Maestro"
		tell front window
			tell group 4
				click button 2
			end tell
		end tell
	end tell
end tell


2 Likes

Thanks for sharing!
May I suggest that you post these macros to the Macro Library section/category, and add to the Best Macros list.

I'm sure lots of KM users would benefit.

1 Like

thanks. Let's see what Peter says.

great !! thank you !!!

1 Like

@gglick @JMichaelTX

thank you Gabe for the script.

For the benefit of forum members, I played around and found that I could modify the script to click:

  • modified button Group 1 Button 5
  • used button: Group 3 Button 1

As far as I can see, the used button only displays the last macro used. It is not a used history (a bug?)

For my education in better understanding how to modify applescripts, and only if it is very simple to answer, how would I modify the script to click on enabled macros at the very top left

Here are the specs
standard window "Keyboard Maestro Editor — Click Enabled Macros" (window 1)
group (group 1)
split group (splitter group 1)
scroll area (scroll area 1)
Smart Group "Enabled Macros" (group 1)

thanks very much

This is not an Applescript solution, but it's pretty simple.

Select Enabled Macros Group Macro (v9.0.4)

Select Enabled Macros Group.kmmacros (3.1 KB)

1 Like

great idea. thank you.

It has, IMO, a very unintuitive behavior: You have to click and hold on the "Used" button to see a dropdown of recently run Macro, with the most recent on top.

I've been told that there are other Mac apps that use this behavior, but even if this so I don't like it. I'd submit that many users, like me, are not likely to know the last macro run, if they have a number of macros triggered by events other than direct user action.

So, I just uploaded a companion set of macros that I have been using for a long time to make this easier:

Macro Set: Provide Keyboard Shortcuts for Selecting Recently Edited and Run Macros (v9.0.2)

View ➤ Select Macro ➤ Previous/Next Edited, Command-Option-Left/Right Arrow.

but @peternlewis, @JMichaelTX's macros give a bird's eye view in the form of a drop down list. You can view the complete Edit / Used history (like Chrome Show Full History) and choose where you want to go back in history, as opposed to step by step. Something to consider for a future update.

Click and hold on the history or modified buttons to produce a menu.

Yes, we know that. But for many of us, it is NOT intuitive and is a PITA to use.
Ergo, my Macro. :wink:

Hell GG,

thank you for the scripts which allow you to run step by step through history ← and →

If you long press (click) manually on the < and > history buttons, the display is even better in terms of speed and workflow: you see the complete past or future history as a drop down list, but I find that the less I use the trackpad and cursor the better, especially to click on a tiny icon.

I tried implementing this using your script by simply running the same script multiple times. It sometimes worked, but most of the time not.

How would you modify a script like the one below to long press (click) button 1 instead of a simple click ?

thank you

tell application "System Events"
  tell application process "Keyboard Maestro"
    tell front window
      tell group 4
        click button 1
      end tell
    end tell
  end tell
end tell

Please enter all scripts using the Forum Code Block.

I have revised your post to use the code block.

Thanks.

1 Like

yes you are right. I will keep it in mind in the future. thank you

To modify the script to show the dropdown that appears when you click and hold on the history buttons, you need to change the click button 1 line to use an entirely different command, tell button 1 to perform action "AXShowMenu". The rest of the script can stay the same:

tell application "System Events"
	tell application process "Keyboard Maestro"
		tell front window
			tell group 4
				tell button 1 to perform action "AXShowMenu"
			end tell
		end tell
	end tell
end tell
2 Likes

Works perfectly. Thank you Gabe !

1 Like