Trigger Menu Bar Item: don't fail with icons in menu items?

In an app like Scrivener, sometimes icons precede menu item names:

In this case I want to target the πŸ—„οΈ Resources entry. But no matter what I add it does not work:

Navigate;Go To;πŸ—„οΈ Resources
Navigate;Go To;πŸ—„οΈ*
Navigate;Go To;*Resources

Any idea how to get this to work? Other entries in that menu work fine, only those preceded by an icon fail.

Hi @iandol, I do not have this specific app, but I've tried with Finder and I was able to make it work with both menu items 1 and 2 shown on the screenshot:

Can you try with Finder? Just of curiosity can you check if this works if you configure it from macOS built-in capability "App Shortcuts":

Have you tried with menu-item position?

Navigate;Go To;(10)

it seems like itβ€˜s different because it uses emoji instead of real icons. Maybe BTTβ€˜s search fails with emoji in the string, Iβ€˜ll have a look!

Using the position should however always work

@xidiot: yes Finder works fine, I also tried some other menus in Scrivener:
image

…these work too, as do the OS Window;Move & Resize;Left:

image

So there is is something specific about how KB the dev built those menu items.

@Andreas_Hegenberg

Position doesn't work sadly, Navigate;Go To;(10) just leaves the Navigate menu open. Selecting items in that menu that don't have icons work, e.g. Navigate;Go To;Next document

I think I found the issue. For whatever reason calling Apple's "lowerCaseString" function doesn't work on strings that contain emoji (e.g. " :sweat_smile: TEST" stays " :sweat_smile: TEST" after converting it to lowercase... I think this is a bug in the Apple frameworks.
This is a problem because BTT converts all search strings to lowercase, this causes the comparison to fail. I have added a workaround to the latest alpha 4.932 (uploading now)

After all these years of using "lowerCaseString" I have learned something new :smiley:

1 Like

Yes, latest beta working, thanks!!!!!!! :heart_eyes:

For completeness, this method works to select that menu...

1 Like