Jump to content

Sending MouseClick to a non active window.


ljmeijer
 Share

Recommended Posts

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

Link to comment
Share on other sites

You could try ControlClick


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

Link to comment
Share on other sites

quoting my original message:

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


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

Link to comment
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.
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...