Newb Posted August 31, 2013 Posted August 31, 2013 (edited) Hi everyone, How can I wait for a user mouseclick anywhere, then do something after he clicked? IE: While (Mouseclick == false) Sleep(10) Wend Do something because mouse has been clicked I've seen that you can check with _IsPressed, but how you can treat it like an event? Thanks Edited August 31, 2013 by Newb I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.
Solution 5471665561 Posted August 31, 2013 Solution Posted August 31, 2013 (edited) $dll = DllOpen("user32.dll") While NOT _IsPressed("01", $dll) Sleep (50) WEnd ;do stuff DllClose($dll) Something like this or am I mis-interpretting? Also you need to include the Misc.au3 library...forums were not letting me properly include it. Edited August 31, 2013 by Durnt
Newb Posted August 31, 2013 Author Posted August 31, 2013 Yeah, that is it. But I will have to try it. I have the suspect that a Sleep(50) will cause some clicks to miss if done while script is in Sleep. Better 10 ms sleep. Anyway shame on me for missing such a simple code. Thanks Durnt, cheers! I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.
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