Jump to content

Send Key while not focused


Recommended Posts

Some controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick().

Using 2 for the number of clicks will send a double-click message to the control - this can even be used to launch programs from an explorer control!

Link to comment
Share on other sites

Just to clarify, so you guys are saying that all the control() functions can be sent to a minimized/running in background window!?

Yes, run this sample code...
Run("calc")
WinWait("Calculator", "Backspace")
WinSetState("Calculator", "Backspace", @SW_MINIMIZE)
ControlClick("Calculator", "Backspace", "Button10", "", 3)
...and you should have "555" entered in while it was minimized.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...