Jump to content
Sign in to follow this  

properly use of "call"function

Recommended Posts

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


Call ("find")

Func find()



Until $var == 0xFFFFFF

MouseClick ( "right", $X, $Y, 1)


Func search()

$X = Random (0, 1024, 1)

$Y = Random (0, 768, 1)

$var = PixelGetColor( $X, $Y)

MouseMove ($X, $Y ,5)


Func MyExit()




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

Share this post

Link to post
Share on other sites

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
    Sleep(50);Avoid CPU load

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...