Problem selecting VirtualBox host menu item

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
maf
Posts: 18
Joined: 16 Feb 2020, 05:14

Problem selecting VirtualBox host menu item

03 Aug 2021, 12:31

Hi,

I would like to execute a command from one of the menus of a VirtualBox host windows. As a first test I tried

Code: Select all

#IfWinActive, Oracle VM VirtualBox
F1::WinMenuSelectItem, Oracle VM VirtualBox, , 5&, 6&
The fifth menu is "Help", its sixth submenu is "About VirtualBox...". So I hoped the about box would open. I also tried the (German) names of the menu items. But both ways, nothing happens. What is my mistake?

P.S.: The only thing I got working to far is

Code: Select all

#IfWinActive, Oracle VM VirtualBox
F1::MsgBox You are currently using VirtualBox
Last edited by maf on 03 Aug 2021, 13:54, edited 1 time in total.
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: Problem selecting VirtualBox host menu item

03 Aug 2021, 13:44

The "Oracle VM VirtualBox Manager" is a QWidget window. WinMenuSelectItem only works with Win32 menus.

You can invoke the desired menu item by sending keystrokes.

Alternatively, you can try the command line tool VBoxManage (included with VirtualBox).
maf
Posts: 18
Joined: 16 Feb 2020, 05:14

Re: Problem selecting VirtualBox host menu item

03 Aug 2021, 14:20

Alguimist wrote:
03 Aug 2021, 13:44
The "Oracle VM VirtualBox Manager" is a QWidget window. WinMenuSelectItem only works with Win32 menus.
Ok, thanks for the explanation!
Alguimist wrote:
03 Aug 2021, 13:44
You can invoke the desired menu item by sending keystrokes.
Do you mean keystrokes like Alt-<key> where the key is identified by the underlined character in the menu item? Unfortunately, the VirtualBox menu does not seem to define such keys - there are no underlined characters.
Alguimist wrote:
03 Aug 2021, 13:44
Alternatively, you can try the command line tool VBoxManage (included with VirtualBox).
Yes, but vboxmanage controlvm screenshotpng will take a picture of the complete guest display, while I need the active windows.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Google [Bot], OrangeCat and 180 guests