identify if 3rd party window main menu is active? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
autocart
Posts: 214
Joined: 12 May 2014, 07:42

identify if 3rd party window main menu is active?

01 Jun 2019, 11:22

Hi all,

does someone know if and how it is possible to identify if a 3rd party window main menu is currently active? In effect, whether Alt was pressed and the accelorator characters of the main menu are currently underlined?

Thx and regards
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: identify if 3rd party window main menu is active?  Topic is solved

01 Jun 2019, 19:48

This should get the process name for any visible standard Windows context menu.

Code: Select all

q:: ;get process name for visible context menu
if !hWnd := WinExist("ahk_class #32768")
{
	MsgBox, % "no context menu found"
	return
}
WinGet, vPName, ProcessName, % "ahk_id " hWnd
MsgBox, % vPName
return
The code here can detect if a menu bar is focused:
detecting menus in mpc-hc - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=55247&p=237141#p237141
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
autocart
Posts: 214
Joined: 12 May 2014, 07:42

Re: identify if 3rd party window main menu is active?

02 Jun 2019, 07:10

jeeswg wrote:
01 Jun 2019, 19:48
The code here can detect if a menu bar is focused:
detecting menus in mpc-hc - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=55247&p=237141#p237141
This was exactly what I was looking for!
The other part above should also prove helpful.

THANK YOU SOOO MUCH, JEESWG, YOU MAKE THE WORLD A BETTER PLACE AND OTHER PEOPLES LIFES HAPPIER AND MORE WORTH LIVING!!!!
THANK YOU!!!!!!
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: identify if 3rd party window main menu is active?

06 Jul 2019, 10:15

That's great! :P

Working with menu bars was one of the first times I had to work with DllCall etc from scratch, there wasn't any relevant code on the forum at the time.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CrowexBR, Joey5, Nerafius, Rohwedder and 120 guests