ljmeijer Posted September 30, 2005 Posted September 30, 2005 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
BigDod Posted September 30, 2005 Posted September 30, 2005 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
ljmeijer Posted September 30, 2005 Author Posted September 30, 2005 quoting my original message: Unfortunattely these buttons are not controls, so I cannot ControlClick() them
LxP Posted September 30, 2005 Posted September 30, 2005 This may help you -- a script that can send clicks to minimised windows. I can't imagine why it wouldn't work for non-minimised unfocussed windows as well.
BigDod Posted September 30, 2005 Posted September 30, 2005 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
MHz Posted September 30, 2005 Posted September 30, 2005 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now