Rawox Posted March 30, 2009 Share Posted March 30, 2009 I've made a GUI with an input box ( $Length ) with a maximum of 20. I want to create a function that moves the mouse 1 pixel to the left when it can't find the color, if it can find the color it needs to click on that same spot. It needs to repeat this step the many times the user filled in in the input box. For example: if you need to have 10 things it needs to move the mouse until it finds the color, then it'll need to click there and then repeat the step for another 9 times. This is my idea (begin): Func CreateLeftRight() $MousePos = MouseGetPos () $Color = 0x88C859 Send ( "2" ) PixelSearch( $MousePos[0], $MousePos[1], $MousePos[0], $MousePos[1], $Color, 18 ) If @Error Then MouseMove ( $MousePos[0]+1, $MousePos[1], 1 ) CreateLeftRight() Else EndIf EndFunc I don't know what to do Link to comment Share on other sites More sharing options...
Rawox Posted March 30, 2009 Author Share Posted March 30, 2009 Well,, I managed to continue it! but it doesn't stop... Func CreateLeftRight() $MousePos = MouseGetPos () $Color = 0x88C859 $i = 1 Send ( "2" ) While $i <= $Length PixelSearch( $MousePos[0], $MousePos[1], $MousePos[0], $MousePos[1], $Color, 35 ) If @Error Then MouseMove ( $MousePos[0]+1, $MousePos[1], 1 ) CreateLeftRight() Else MouseClick ( "Left", $MousePos[0], $MousePos[1], 1, 1 ) EndIf WEnd EndFunc Anyone?? Link to comment Share on other sites More sharing options...
Robbinski12 Posted March 30, 2009 Share Posted March 30, 2009 nee weet ik niet Link to comment Share on other sites More sharing options...
jvanegmond Posted March 30, 2009 Share Posted March 30, 2009 Func CreateLeftRight() $MousePos = MouseGetPos () $Color = 0x88C859 Send ( "2" ) PixelSearch( $MousePos[0], $MousePos[1], $MousePos[0], $MousePos[1], $Color, 18 ) If @Error Then MouseMove ( $MousePos[0]+1, $MousePos[1], 1 ) CreateLeftRight() Else ExitLoop ; ??????? EndIf EndFunc This github.com/jvanegmond 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