newbie01 Posted June 19, 2009 Share Posted June 19, 2009 I write my script on 4:3 screen, 17", screen resolution 1024x768. But when I run on 14" monitor and the 21", 16:9 screen, It dont run Here's my code Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) WinMove("Element Client","", -1, -1, 1026,743) while 1 if PixelSearch(470,600,513,636,0xFFE955) <> @error Then MouseClick("left",493,619) ;--> Click (!) sleep(500) Select case PixelSearch(440,636,585,662,0xFFFFFF) <> @error Do MouseClick("left",517,650) sleep(500) MouseClick("left",442,425) sleep(500) until PixelSearch(440,636,585,662,0xFFFFFF) = @error Case Else MouseClick("left",442,425) sleep(500) EndSelect EndIf WEnd Could any one help me! Link to comment Share on other sites More sharing options...
GodlessSinner Posted June 19, 2009 Share Posted June 19, 2009 Look at, compare, replace. WinMove("Element Client","", -1, -1, @DesktopWidth,@DesktopHeight) _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
newbie01 Posted June 19, 2009 Author Share Posted June 19, 2009 Could U say it clearly? I think if running on 16:9 screen (1680x1050) so the coordinates in Pixelsearch() has been changed and It dont run correctly Link to comment Share on other sites More sharing options...
oMBRa Posted June 19, 2009 Share Posted June 19, 2009 You can solve this problem with some basic math, for example on your 1680x1050 screen the pixel with 474 as the X coordinate is at 286 on a 1024x768 here is how to do it: 1680:470 = 1024:x x = 470*1024/1680, x is the value you need Link to comment Share on other sites More sharing options...
newbie01 Posted June 20, 2009 Author Share Posted June 20, 2009 I use Opt(), It defend on Client windows, not screen but why It dont run Link to comment Share on other sites More sharing options...
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