Jump to content

same mouseclick under 3 resolutions?


Recommended Posts

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.

Nomad

Edit: You can also try to use ControlClick and give the text on the control.

Edited by Nomad
Link to comment
Share on other sites

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.

:)

Link to comment
Share on other sites

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.

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...