Jump to content

Change display resolution


BJJ
 Share

Recommended Posts

I back with new grief

My program click on this point

MouseClick ( "" , 1524 , 625 , 1 , 0)
MouseClick ( "" , 1452 , 726 , 1 , 0)

but this position be good only for screen resolution 1680 x 1050

I want make script who find use resolution and change MouseClick position

Edited by Quzziy
Link to comment
Share on other sites

I back with new grief

My program click on this point

MouseClick ( "" , 1524 , 625 , 1 , 0)
MouseClick ( "" , 1452 , 726 , 1 , 0)

but this position be good only for screen resolution 1680 x 1050

I want make script who find use resolution and change MouseClick position

Hello Quzziy.

I am almost certain that you want to look at the following AutoIt built-in @Macros.

@DesktopHeight Height of the desktop screen in pixels. (vertical resolution)

@DesktopWidth Width of the desktop screen in pixels. (horizontal resolution)

Ref: http://www.autoitscript.com/autoit3/docs/macros.htm

I hope this helps. Thanks.

avery

www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org
Link to comment
Share on other sites

$developWidth = 1024
$runWidth = @ScreenWidth

$ratio = $runWidth / $developWidth

MouseClick ( "" , 1524 * $ratio , 625 * $ratio , 1 , 0)

I don't know if the math is correct. It's either * $ratio or / $ratio.

I was also thinking that a ratio might work but I am not sure it will depending on the application you are working with. If it is just the desktop that might be fine. If it is an application, there may be some font changes as well as things the application might do differently. Is there anything specific about the target location other than the coords. Is there a bitmap or certain pixels there that could be identified? What are you trying to accomplish.

Bob

--------------------bobchernow, Bob ChernowWhat a long strange trip it's beenUDFs: [post="635594"]Multiple Monitor Screen Resolution Change[/post]

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