DIMM_V2 Posted December 10, 2023 Share Posted December 10, 2023 (edited) Hi , this code is working only if i Click by myself on button "help" , why is that ? i have some mistakes here ? testing on 32 bits version of Everything Run("Everything.exe") ; Wait for the "Everything" window to become active Sleep(500) ; Get the handle of the "Everything" window $hWindow = WinGetHandle("Everything") ; Use the control class for the menu, not the main window class $hControl = ControlGetHandle($hWindow, "", "[CLASS:EVERYTHING]") Sleep(500) ControlFocus($hWindow, $hControl ,"[CLASS:EVERYTHING]") WinMenuSelectItem($hWindow, "", "&Help", "&About Everything...") Edited December 10, 2023 by DIMM_V2 Link to comment Share on other sites More sharing options...
Danp2 Posted December 10, 2023 Share Posted December 10, 2023 Did you see this note in the help file entry for WinMenuSelectItem? Quote WinMenuSelectItem() will only work on standard menus. Unfortunately, many menus in use today are actually custom written or toolbars "pretending" to be menus. This is true for most Microsoft applications. argumentum 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
bdr529 Posted December 10, 2023 Share Posted December 10, 2023 Run("Everything.exe") WinWait("Everything") winactivate("Everything") Send("{ALT}h") To community goes all my regards and thanks Link to comment Share on other sites More sharing options...
DIMM_V2 Posted December 11, 2023 Author Share Posted December 11, 2023 On 12/10/2023 at 3:05 PM, Danp2 said: Did you see this note in the help file entry for WinMenuSelectItem? yes , i saw it , and it strange because as i said before , it works anyway , but first click must be on "help" , so that means that works , maybe i need to do some "focus" before . Link to comment Share on other sites More sharing options...
DIMM_V2 Posted December 11, 2023 Author Share Posted December 11, 2023 (edited) On 12/10/2023 at 4:10 PM, bdr529 said: Run("Everything.exe") WinWait("Everything") winactivate("Everything") Send("{ALT}h") WinWaitActive("Everything", "", "") $hWindow = WinGetHandle("Everything") ControlSend($hWindow, "", "", "!h") ControlSend($hWindow, "", "", "a") WinMenuSelectItem - i want to use this , to be shure that it really working your code ; and mine this is working , but it's too easy. Edited December 11, 2023 by DIMM_V2 Link to comment Share on other sites More sharing options...
Solution DIMM_V2 Posted December 11, 2023 Author Solution Share Posted December 11, 2023 (edited) this is a home build but it's working each time. ✔️ Run("Everything.exe") Sleep(500) ; Get the handle of the "Everything" window $hWindow = WinGetHandle("Everything") ; Use the control class for the menu, not the main window class $hControl = ControlGetHandle($hWindow, "", "[CLASS:EVERYTHING]") ;~ activate some kind of focus for Everything ControlSend($hWindow, "", "", "!h") ControlSend($hWindow, "", "", "{ESC}") ;~ activate some kind of focus for Everything Sleep(500) WinMenuSelectItem($hWindow, "", "&Help", "&About Everything...") Edited December 11, 2023 by DIMM_V2 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