charvi Posted December 13, 2008 Posted December 13, 2008 I was wondering if there is a way to click anywhere on the screen, and depending of the location it was clicked, I would like to: 1) get the X,Y pixel location in variables $x and $y 2) know what it returns to the event $Msg This because I have placed fake buttons on the screen - that are just pictures - but that they act if they were real buttons. I hope that someone has a nice script example...
Rental Posted December 13, 2008 Posted December 13, 2008 (edited) for #1 try #include <misc.au3> while 1 $mouse = mousegetpos() $x = $mouse[0] $y = $mouse[1] if _ispressed(01) then msgbox(0,"",$x&"-"&$y) endif wend #2 try using the advanced mode in guigetmsg. $msg = guigetmsg(1) Edited December 13, 2008 by Rental
charvi Posted December 13, 2008 Author Posted December 13, 2008 for #1 try #include <misc.au3> while 1 $mouse = mousegetpos() $x = $mouse[0] $y = $mouse[1] if _ispressed(01) then msgbox(0,"",$x&"-"&$y) endif wend #2 try using the advanced mode in guigetmsg. $msg = guigetmsg(1)Wonderful !! Thank you Rental !!
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