wreck Posted April 28, 2009 Share Posted April 28, 2009 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 EndFunccould any1 tell me what i did wrong :|? Link to comment Share on other sites More sharing options...
LurchMan Posted April 28, 2009 Share Posted April 28, 2009 (edited) 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 April 28, 2009 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. Link to comment Share on other sites More sharing options...
wreck Posted April 28, 2009 Author Share Posted April 28, 2009 works perfect thanks 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