Jump to content
Sign in to follow this  
ffrankcool

Send Key while not focused

Recommended Posts

ffrankcool

Is it possible to send a key/click to a window while it ain't on top of the others/focused !?

If yes could link me the documentation to this.

-Frank

Share this post


Link to post
Share on other sites
ffrankcool

That's for sending text and I needed this:D but I also need to know what about Mouse clicks?

Edit: So will this work for doing background clicks: ControlClick() ?

Edited by ffrankcool

Share this post


Link to post
Share on other sites
Muchuchu

Help menu, look for control() functions

Share this post


Link to post
Share on other sites
ffrankcool

Help menu, look for control() functions

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

Share this post


Link to post
Share on other sites
Muchuchu

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!

Share this post


Link to post
Share on other sites
herewasplato

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]

Share this post


Link to post
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
Sign in to follow this  

×