Select Menu Items Actions Not Working in Vivaldi

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.

In my tests this method fails in Vivaldi. They seem to be doing something quite unorthodox...

-Chris

Hi There,

Is there a solution to this problem in the meantime?

Best, Matze

Hey Christian,

That's pretty easy to just test and see...

This works for me in Vivaldi 5.6.2867.40 on macOS 10.14.6 Mojave.

-Chris


Menu ⇢ Bookmarks.kmmacros (2.3 KB)
Keyboard Maestro Export

Hey Chris,

Of course I did test it with macros I've created. Because they did not work, I asked.

Best Matze

Mac OS 13.0.1
Bookmarks.kmmacros (2.1 KB)
Bildschirm­foto 2022-12-14 um 13.26.24

Hey Matze,

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.

image

I suggest you report this bug to Vivaldi.

-Chris

1 Like

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

2 Likes

Sorry, it's probably my fault not to understand, but if you can set up the shortcut directly in Vivaldi, why do you want to set it up in KM?

Hi Frank,

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.

Best Matze

Hi Matze,

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.

And if a Vivaldi shortcut is just "weird", you can change it as you like.

By "capture" do you mean the Vivaldi's screenshots? So that

You can still define your palette by triggering the Vivaldi shortcuts with KM.

Sorry, I don't want to bore you with things you already know. I probably still misunderstand you :slightly_smiling_face:

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.

Ok, just one more thing, to stay with your example,

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".

2 Likes

Pfiffig. This is a neat workaround! :smiley:

Yes, that's what I've been trying to say all along. My English is bad.... :slightly_frowning_face:

Mein Deutsch ist auch besser.

:joy: Es gibt leider viele Apps, die mit KM nicht über die Menus angesprochen werden können. Dieser workaround ist dann jeweils meine Lösung :wink:

Gut zu wissen. Wenn die Arbeit mit Keyboard Maestro eine Reise ist, dann packe ich gerade erst meine Koffer.

1 Like

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.

It's not about elegance – it's about the potential for unintended side-effects.

The thing you most want to avoid is having a macro with a hotkey trigger than activates the same keyboard shortcut as its own trigger.

Make sure you have a kill-switch in the event that you create an endless loop somewhere.

Cancel / Kill All Running Macros

Yes, for this reason I keep a list of complicated shortcuts I would never use, like ⌘⌥⌃⇧+F12

This way I know where I've used these shortcuts and I make sure I don't use them twice.

2 Likes