Jump to content

Recommended Posts

Posted

is there any possibility that a mouseclick can hit the same button in resolution like 800x600 , 1024x768 and 1280x1024?

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

Nomad

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

Edited by Nomad
Posted

Controlclick would be better as it goes directly to the control you want it to

Who needs puzzles when we have AutoIt!!

Posted

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.

:)

Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...