Fixis Posted February 12, 2012 Share Posted February 12, 2012 Hello everyone, Let's say I open Notepad and I click "File" on the menu and a dropdown list appears. If I click on "Edit" a different dropdown will appear. Is there a way for Autoit to find out if the "File" or "Edit" dropdown menu is currently on the screen? Thank you. Link to comment Share on other sites More sharing options...
Guest Posted February 12, 2012 Share Posted February 12, 2012 (edited) Hope this helps you. #include <GuiMenu.au3> While 1 Sleep(10) If WinActive("[CLASS:Notepad]") Then ;Makes sure not any active ContextMenu is accepted If WinExists("[CLASS:#32768]") Then ;Makes sure it is a ContextMenu. $SomeName = _GUICtrlMenu_GetMenuBarInfo(WinGetHandle("[CLASS:#32768]" ), 0, 0) MsgBox(64,"Information about the current ContextMenu",$SomeName[0]&" - X coordinate of the upper left corner of the rectangle"&@CRLF& _ $SomeName[1]&" - Y coordinate of the upper left corner of the rectangle"&@CRLF& _ $SomeName[2]&" - X coordinate of the lower right corner of the rectangle"&@CRLF& _ $SomeName[3]&" - Y coordinate of the lower right corner of the rectangle"&@CRLF& _ $SomeName[4]&" - Handle to the menu bar or popup menu"&@CRLF& _ $SomeName[5]&" - Handle to the submenu"&@CRLF& _ $SomeName[6]&" - True if the menu bar has focus, otherwise False"&@CRLF& _ $SomeName[7]&" - True if the menu item has focus, otherwise False"&@CRLF) EndIf EndIf WEnd Edited February 12, 2012 by Guest Link to comment Share on other sites More sharing options...
Fixis Posted February 13, 2012 Author Share Posted February 13, 2012 Astounding! Thank you, Aipion Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now