Jump to content
Sign in to follow this  
wreck

need help

Recommended Posts

wreck

Dim $stop = 0

HotKeySet ("{F1}","go")

HotKeySet ("{F2}","stop")

HotKeySet ("{F3}","quit")

while 1

sleep(15)

WEnd

Func go ()

$stop= 3

EndFunc

Func stop ()

$stop = 1

EndFunc

Func quit ()

Exit

EndFunc

Func bot ()

While $stop > 2

mousemove (223, 23[,1]);

mouseclick ("left"[,223,23[,1 [,1]]]);

Sleep (3000);

mousemove (508,776[1]);

mouseclick ("left" [,508,776[1][10]]);

Sleep (780000);

WEnd

EndFunc

could any1 tell me what i did wrong :|?

Share this post


Link to post
Share on other sites
LurchMan

Global $stop = 0;make it global so all functions can use it.

HotKeySet ("{F1}","go")
HotKeySet ("{F2}","stop")
HotKeySet ("{F3}","quit")

while 1 
sleep(100);dont use a sleep lower than 100 - itll take all of your cpu...
WEnd

Func go ()
     bot(3);you need to add in a call for the func
EndFunc

Func stop ()
       Bot (1)
EndFunc

Func quit ()
     Exit
EndFunc

;I removed all of the [ ] from the syntax because when 
;you see them in the help file for syntax that means that parameter is optional

Func bot ($stop)
     While $stop > 2 
           mousemove (223, 23,1)
           mouseclick ("left",223,23,1 ,1)
           Sleep (3000)
           mousemove (508,776,1)
           mouseclick ("left" ,508,776,1)
          Sleep (780000);this is a sleep timer of 13 mins....why?
     WEnd
EndFunc

hope this helps....

Edit: I didn't test this...

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites
wreck

works perfect ;)

thanks ^_^

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  

×