caveman Posted November 11, 2007 Posted November 11, 2007 i was trying to create a little program with an endless loop but the script works only once... +++++++++++++++++++++++++++++++ HotKeySet("^!x", "MyExit") Dim $var, $X, $Y find() Call ("find") Func find() Do search() Until $var == 0xFFFFFF MouseClick ( "right", $X, $Y, 1) EndFunc Func search() $X = Random (0, 1024, 1) $Y = Random (0, 768, 1) $var = PixelGetColor( $X, $Y) MouseMove ($X, $Y ,5) EndFunc Func MyExit() Exit EndFunc ++++++++++++++++++++ as you can see abouve i was trying to do the "find" function untill "^!x" is pressed, this code works only 2 times, so i cannot see the differnece between the 'function name' and the 'call'+'function' thank you for your help
Nahuel Posted November 11, 2007 Posted November 11, 2007 In your case, Call("find") does exactly the same as find(). That's why it does it twice. If you want to do that endlessly, just do it like this: While 1 find() Sleep(50);Avoid CPU load Wend
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