SASL Posted January 30, 2021 Posted January 30, 2021 Hello, I want to check a specific submenu (File explorer --> View --> extra large icons). My code is like this: ShellExecuteWait("C:\WINDOWS\EXPLORER.EXE",@ScriptDir) $hWnd=WinWaitActive(@ScriptDir, "", 0) $nnn=_GUICtrlMenu_GetMenu($hWnd) $nnnn=_GUICtrlMenu_FindItem($nnn,"view") ConsoleWrite($nnnn) I get 3 which is the correct order of "View". What would be the next line to find the submenu "extra large icons"? Thanks for help. but i get a failure
Developers Jos Posted January 30, 2021 Developers Posted January 30, 2021 (edited) Why are you trying to use _GUI* UDFs as the shown GUI isn't your own? I see you did it earlier with the appropriate command: If that doesn't work then post your script that is runnable as the posted script is obviously not working. Jos Edited January 30, 2021 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
SASL Posted January 30, 2021 Author Posted January 30, 2021 Hi. You are perfectly right: using Send works, as stated earlier. But I want to identify and manipulate submenus as another way to get the result. So how can I list the submenus of a specific selected Menu ? For example if I want to check Ascending or Descending View in File Explorer? Thanks for your quick reply.
Developers Jos Posted January 30, 2021 Developers Posted January 30, 2021 I was not referring to Send() but that other function in there. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
SASL Posted January 30, 2021 Author Posted January 30, 2021 Excuse me, but I dont understand your comments which are too smart for me. My only concern is: Can I find a function for Submenus like the one for Menus (_GUICtrlMenu_FindItem)?
Developers Jos Posted January 30, 2021 Developers Posted January 30, 2021 Which other command have you used in the linked post? .... can't be that hard! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
SASL Posted January 30, 2021 Author Posted January 30, 2021 WinMenuSelectItem("Documents", "", "View", "Extra large icons")?
SASL Posted January 31, 2021 Author Posted January 31, 2021 In fact, WinList() doesnt give the handle of File Explorer Window! Is there an explanation?
Nine Posted January 31, 2021 Posted January 31, 2021 Yes WinList does provide all File Explorer handles and titles. You need to look at little closer. To help you, you could list all windows classes along with the handle, it would make it obvious then. “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
SASL Posted January 31, 2021 Author Posted January 31, 2021 I tried this one WinList("[CLASS:CabinetWClass]") and it gave me 2 items: one is File Explorer and the other has the name of the Directory I am exploring. When using the handles, I couldn't get any Menu from them ! What to do?
Nine Posted January 31, 2021 Posted January 31, 2021 Use UIAutomation. The _GUICtrlMenu* functions does not work with Explorer. You will need to send keys otherwise...Or use this : “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
SASL Posted February 1, 2021 Author Posted February 1, 2021 Very interesting. I will take a look at it. Thanks a lot.
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