Sign in to follow this  
Followers 0
ljmeijer

Sending MouseClick to a non active window.

6 posts in this topic

Hey.

Does anybody know if I can send mouseclicks to a non active window. I'm writing a script that can take a long time to complete. I'd like the user to be able to use other applications while this script is running. At some point in its execution this script needs to click on some buttons. Unfortunattely these buttons are not controls, so I cannot ControlClick() them, I'm afraid an actual mouseclick is required.

I'm hoping maybe there is a way to send a mouseevent trough the windows message loop or something?

From what I've seen in the help mouseclick() just clicks whatever window it happens to be in front. I'm now working around the issue by issuing a WinWaitActive() before each of these mouseclicks, but that requires the user to from time to time give the application that the script is controlling focus again.

Does anybody see a solution that I'm missing?

Thanks, Lucas

Share this post


Link to post
Share on other sites



You could try ControlClick



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

quoting my original message:

Unfortunattely these buttons are not controls, so I cannot ControlClick() them

Share this post


Link to post
Share on other sites

quoting my original message:

Sorry , did not read correctly :"> :">


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Hey.

Does anybody know if I can send mouseclicks to a non active window. I'm writing a script that can take a long time to complete. I'd like the user to be able to use other applications while this script is running.

Either AutoIt uses MouseClicks or the user uses the mouse. But not both at the same time. Bit of a double sided sword.

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  
Followers 0