Jump to content

WinMenuSelectItem


DIMM_V2
 Share

Go to solution Solved by DIMM_V2,

Recommended Posts

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 by DIMM_V2
Link to comment
Share on other sites

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

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 by DIMM_V2
Link to comment
Share on other sites

  • Solution

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 by DIMM_V2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...