tech2 Posted March 11, 2009 Share Posted March 11, 2009 (edited) im looking for some help with this code while 1 If (0xFFFFFF = PixelGetColor(334, 146)) Then ;mouse moves to color exitloop EndIf wend when the color is found i want the mouse to move to that color and also i want the pixelgetcolor to search the whole screen thx much Edited March 11, 2009 by tech2 Link to comment Share on other sites More sharing options...
James Posted March 11, 2009 Share Posted March 11, 2009 MouseMove() Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
tech2 Posted March 11, 2009 Author Share Posted March 11, 2009 MouseMove()yes but how do i get it to move to the color? Link to comment Share on other sites More sharing options...
James Posted March 11, 2009 Share Posted March 11, 2009 Well you just found the co-ordinates with PixelGetColor() - X:334 Y:146. So if there is a match then: While 1 If (0xFFFFFF = PixelGetColor(334, 146)) Then MouseMove(334, 146) ExitLoop EndIf WEnd Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
tech2 Posted March 11, 2009 Author Share Posted March 11, 2009 Well you just found the co-ordinates with PixelGetColor() - X:334 Y:146. So if there is a match then: While 1 If (0xFFFFFF = PixelGetColor(334, 146)) Then MouseMove(334, 146) ExitLoop EndIf WEnd yes but im wanting the the pixelgetcolor to check the whole screen not jus those corodinates the move the mouse to the color thx for the replys so far Link to comment Share on other sites More sharing options...
TerarinK Posted March 11, 2009 Share Posted March 11, 2009 PixelSearch is what you are looking for, search the help after it. 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
James Posted March 11, 2009 Share Posted March 11, 2009 yes but im wanting the the pixelgetcolor to check the whole screen not jus those corodinates the move the mouse to the color thx for the replys so farSorry. Look at PixelSearch() Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
TheOnlyOne Posted March 11, 2009 Share Posted March 11, 2009 (edited) you can do like this $left=0 $top=0 $right=1279 $bottom=1023 while 1 $search=pixelsearch ($left,$top,$right,$bottom,0xFFFFFF,1,1) if not @error then mouseclick ("left",$search[0],$search[1],1,10) sleep (20) wend Edited March 11, 2009 by TheOnlyOne Link to comment Share on other sites More sharing options...
James Posted March 11, 2009 Share Posted March 11, 2009 Change $right and $bottom to this: $right = @DesktopWidth $bottom = @DesktopHeight It will search your whole desktop. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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