bass711 Posted February 6, 2009 Share Posted February 6, 2009 If it is possible to create a moving rectangle that you can drag with your mouse to any position you desire on your screen to compare pixel colors value, well let me explain a little bit more this is for those games bubbles where you shoot a color ball to the same color ball red=red etc, so i need the script to know that from the center of rectangle get the color of the ball and look for the near color pixel that match that color and then mouseclick all i need to do is merge that compare code to that one i have take a look. expandcollapse popuppixelgetcolor Position<------------------ THIS WHERE IM STUCK If IsArray($coord) = 1 Then $color = 0xFE4949 $color2 = 0xF5F423 $color3 = 0x097CB5 $color4 = 0x6EBB1F $color5 = 0xFE4949 $coord = PixelSearch( 0, 0, 800, 800, $color) If IsArray($coord) = 1 Then MouseClick('left', $coord[0], $coord[1], 1, 1) Sleep(50) EndIf $coord1 = PixelSearch( 0, 0, 800, 800, $color2) If IsArray($coord1) = 1 Then MouseClick('left', $coord1[0], $coord1[1], 1, 1) Sleep(50) EndIf $coord2 = PixelSearch( 0, 0, 800, 800, $color3) If IsArray($coord2) = 1 Then MouseClick('left', $coord2[0], $coord2[1], 1, 1) Sleep(50) EndIf $coord3 = PixelSearch( 0, 0, 800, 800, $color4) If IsArray($coord3) = 1 Then MouseClick('left', $coord3[0], $coord3[1], 1, 1) Sleep(50) EndIf $coord4 = PixelSearch( 0, 0, 800, 800, $color5) If IsArray($coord3) = 1 Then MouseClick('left', $coord4[0], $coord4[1], 1, 1) Sleep(50) EndIf WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc 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