blub Posted May 28, 2006 Posted May 28, 2006 is there any possibility that a mouseclick can hit the same button in resolution like 800x600 , 1024x768 and 1280x1024?
Nomad Posted May 28, 2006 Posted May 28, 2006 (edited) is there any possibility that a mouseclick can hit the same button in resolution like 800x600 , 1024x768 and 1280x1024?Dunno, I never tried really. Try this and see:Opt("MouseCoordMode", 2) Read up on this in the help menu to see how it works. I've used it for switching from full screen at 800x600 to a window that had a client size of 800x600 and it works fine. I've never tried changing the resolution though. If this doesn't work you will probably have to detect the resolution and use variables to offset accordingly.NomadEdit: You can also try to use ControlClick and give the text on the control. Edited May 28, 2006 by Nomad
Rick Posted May 28, 2006 Posted May 28, 2006 Controlclick would be better as it goes directly to the control you want it to Who needs puzzles when we have AutoIt!!
MHz Posted May 28, 2006 Posted May 28, 2006 If the window being automated is a fixed window size for each resolution, then using Opt('MouseCoordMode', 2) should allow the mouse to click within the windows client area. You can set Au3Info to client mode through the menu. If ControlIDs can be seen by Au3Info, then using ControlClick maybe a better sokution as resolution or active windows are not a concern.
imbatmo Posted May 28, 2006 Posted May 28, 2006 Func coordinates ($x, $y, $resolution_old, $resolution_new) $newx = Int($x / $resolution_old[0] * $resolution_new[0]) $newy = Int($y / $resolution_old[1] * $resolution_new[1]) dim $array[2] $array[0]=$newx $array[1]=$newy return $array EndFunc should work to convert coordinates between different resolutions.
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