ripdad Posted April 23, 2020 Share Posted April 23, 2020 I have never had the need to get all the controls of another program, until now. My main goal is to be able to get the handles of the right-click menu. I have tried Au3Info.... but of course the menu disappears when I drag the tool to the menu. Any help would be appreciated. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
Nine Posted April 23, 2020 Share Posted April 23, 2020 Unfreeze the tool before right-clicking (see tool menu) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ripdad Posted April 23, 2020 Author Share Posted April 23, 2020 (edited) Wow, didn't know you could that. It shows the GUI handle, but not the right-click menu handles. -edit- It does show the menu handle, but not the menu item controls. Edited April 23, 2020 by ripdad "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
Nine Posted April 23, 2020 Share Posted April 23, 2020 You may try to use GuiMenu UDF, to access menu items... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ripdad Posted April 23, 2020 Author Share Posted April 23, 2020 Using GuiMenu, I was able to get the GUI Main Menu but not the right-click menu. I will sift through the GuiMenu examples here on the forum, and see if I can come up with a solution. Thanks for your response. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
Nine Posted April 23, 2020 Share Posted April 23, 2020 Here to get you started with Notepad though : #include <Constants.au3> #include <WinAPISysWin.au3> #include <WindowsConstants.au3> #include <GuiMenu.au3> #include <WinAPIConv.au3> Opt ("MustDeclareVars", 1) Run ("Notepad.exe") Local $iDWord = _WinAPI_MakeLong (0x200, 0x120) ; ($x, $y) Local $hWnd = WinWaitActive ("[CLASS:Notepad]") Local $hCtrl = ControlGetHandle ($hWnd, "", "Edit1") _WinAPI_PostMessage ($hCtrl, $WM_CONTEXTMENU, 0, $iDWord) Sleep (800) Local $hMenuWnd = WinGetHandle ("[CLASS:#32768]") Local $hMenu = _SendMessage($hMenuWnd, $MN_GETHMENU) If Not _GUICtrlMenu_IsMenu($hMenu) Then Exit MsgBox ($MB_SYSTEMMODAL,"","Unable to retrieve context menu handle") Local $iCount = _GUICtrlMenu_GetItemCount ($hMenu) For $i = 0 to $iCount-1 ConsoleWrite (_GUICtrlMenu_GetItemText ($hMenu, $i) & @CRLF) Next IgImAx 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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