Sometimes app menus are dynamic, so try selecting the top level menu first, once,
then (again) do a menu selection, but this time selecting the whole menu path again.
Also, I've seen BTT sometimes needs an additional "Activate App" action in KM for BTT to work.
I mean, sometimes BTT needs to activate an app so it is sent to the front. Only have seen this odd behavior with BTT, but it works.
You'd be surprised at often people don't test or research at all before asking questions on the forum, so "of course" is never to be assumed...
It's also a good idea to mention what versions of macOS and Keyboard Maestro you're using. (For convenience I have a macro that inserts this text for me.)
Apple has been playing games with menus in that last couple of versions of macOS and that has broken various utilities and workflows. I thought this might be at issue here, but now you’ve defined your problem I can replicate it – and I don't think this is Apple's problem – I think it's Vivaldi's.
Remove “Show Bookmarks Panel” from the action and leave “View” – this will open the view menu.
Using a second select-menu action usually works in these cases, but it does not work with my version of Vivaldi on Mojave.
I can get AppleScript UI-Scripting to select “Show Bookmarks Panel” in the menu, but it does not activate. (I had to wrestle with Vivaldi to get that done reliably.)
tell application "System Events"
tell application process "Vivaldi"
tell menu bar 1
tell menu bar item "View"
tell menu 1
perform action "AXPress"
set showBookmarksPanelMenuRef to menu items whose title contains "Show Bookmarks Panel"
if length of showBookmarksPanelMenuRef > 0 then
set showBookmarksPanelMenuRef to item 1 of showBookmarksPanelMenuRef
else
error "Get “Show Bookmarks Panel” Reference Failed!"
end if
set selected of showBookmarksPanelMenuRef to true
keystroke return
end tell
end tell
end tell
end tell
end tell
I had to resort to selecting it and pressing Return to get it working.
Even changing the “Show Bookmarks Panel” keyboard shortcut using the system keyboard preferences fails to work. The keyboard shortcut shows it has been changed, but it does not actually perform its function.
Hello Chris, please excuse my "of course". I did not mean to be unkind. Thank you very much for your efforts. I have already posted the problem in the Vivaldi forum. And will now also report it as a bug. If I get an answer, I will report it here.
Best regards Matze
Yes, the very standard shortcuts like CMD W, S, T, F and so on I do trigger via the app shortcuts, but in every app there are some commands which have weirder or no shortcuts like in Vivaldi Share ... or Capture ...
For those I want to build a conflict palette, as I am doing in all my apps, that shows these commands plus all the macros I've made for Vivaldi, so that I can choose them via first letters.
This way I don't have to remember all the shortcuts.
Then "Show Bookmarks Panel" (Leselisten-Panel einblenden) was just an example for something else? Because for that you can define a shortcut of your choice directly in Vivaldi.
I have macros for each app that I call from a conflict palette, that only opens when the app is frontmost. I find the idea of adding normal commands to this palette useful. That way everything is in one place. Which doesn't preclude me from continuing to use shortcuts. And yes, I know the Vivaldi Shortcuts pref and I am using it to assign shortcut to some commands like next tab, go back in history etc.
The way I see it: If F1 (or whatever) triggers a conflict palette, then you can also trigger the shortcut you assigned to "Show Bookmarks Panel" in Vivaldi with this palette. You don't need "Select or Show a Menu Item" but "Type a Keystroke".
Triggering a shortcut with a shortcut is of course not very elegant. This is probably the reason why no one suggests it. But sometimes it is the easiest solution.