"Open Page in Firefox" breaks because there's no "Menu starts with" option

Safari is my primary browser, but I have a macro to open the current page in Firefox, as needed. (Screenshot below.) It relies upon the "Open Page With" command in Safari's Develop menu, which points to the current version of Firefox. The problem is that Firefox is frequently updated, which changes the wording in the menu and regularly breaks the macro. (And by "regularly" I mean often weekly or even more than once per week.)

If there were an option in KM to point to a menu that "Starts With…" and I could choose "Firefox," the rest of the menu command (e.g., "Firefox 116.0.2" wouldn't matter, because KM would only be looking for the word "Firefox."

(@peternlewis Can we please, please have a "Starts with" option for pointing to menu commands?)

In the meantime, does anyone have any suggestions for a way to accomplish this, such that the macro won't break weekly?

You can use RegEx in those text fields and thus ignore the version number.

For example, the action below toggles the Mouse Display in KM.

Action Screenshot (click to expand/collapse)

I don’t have Firefox, and can’t test this, but changing the third text field to the following should work: ^Firefox.*

1 Like

Thank you! This indeed seems to be working!

Unrelated: I can't help but ask: Why do you use a custom macro for KM's Mouse display, when there's already a default shortcut for it (⌘5)?

What does Command-5 do? It does nothing for me, and it's not listed in Apple’s Mac Keyboard Shortcuts page.

Presuming it is like the screen capture coordinates, you can get a display of the absolute position in a screen with the system screen capture commands, but

  1. That shows only the position relative to the current screen, not relative to the desktop, so it is different to Keyboard Maestro’s understanding on your non-main screens.
  2. Shows only the coordinates from the top corner of the screen, so not from other corners.
  3. Has no option to show coordinates relative to the front window.

Glad to help! And I don’t. I just chose a random menu item as an example. :wink:

Got it! Thanks again.

It works in the Keyboard Maestro app.


For those interested in native keyboard shortcuts, you should check out this article.

1 Like

Ahh, ok, shows how much I look at my own program's menus.

I'll go back to writing code now.


Ha! No problem. :blush: