Hemdall Posted May 5, 2009 Posted May 5, 2009 Hi, I've changed a bit someone script but for some reasons it doesn't work for me now. I will be grateful if someone will try to explain to me why it does not work and what I did wrong. WinWaitActive("Eve") Sleep(1000) #include <GUIConstants.au3> #include <Color.au3> ;HotKeySet("{PAUSE}", "TogglePause") ;HotKeySet("{ESC}", "Terminate") Global $MyBotStatus = 0 Do MainLoop() ;; ------------------------------------- ;; Start Idling ;; ------------------------------------- $MyBot_Running = 0 MainLoop() ;; ------------------------------------- ;; Main Bot Loop ;; ------------------------------------- Func MainLoop() PrintStatus("Initilizing...") Sleep(1000) SetStatus(1) EndFunc Func PrintStatus($status) EndFunc ;; ------------------------------------- ;; SetStatus() ;; ------------------------------------- Func SetStatus($status) $MyBotStatus = $status EndFunc ;==>SetStatus ;; ------------------------------------- ;; GetStatus() ;; ------------------------------------- Func GetStatus() Return ($MyBotStatus) EndFunc ;==>GetStatus Func DoStatus() If (GetStatus() > 0) Then EndIf Select Case GetStatus() = 0 ; = Idle PrintStatus("Idle.") Case GetStatus() = 1 ; = Undocking SetStatus(Undock()) Case GetStatus() = 2 ; = Select Target SetStatus(Target()) Case GetStatus() = 3 ; = Fiering Lasers SetStatus(FireLasers()) Case GetStatus() = 4 ; = Sprawdzanie SetStatus(Sprawdzanie()) Case GetStatus() = 5 ; = Powrot SetStatus(Powrot()) EndSelect EndFunc ;==>DoStatus ;; ------------------------------------- ;; Undock() 1 ;; ------------------------------------- Func Undock() PrintStatus("Undocking.") MouseClick("left", 20, 768, 1) PrintStatus("Warping to Belt.") MouseClick("left", 150, 40, 1) Sleep(21000) MouseClick("right", 118, 118, 1) Sleep(3000) MouseClick("left", 230, 126, 1) Sleep(50000) Return 2 EndFunc ;==>Undock
JackDinn Posted May 5, 2009 Posted May 5, 2009 (edited) Do MainLoop()try MainLoop(), Do is part of the Do Until loop commands may well be other errors, Assuming you are using SciTE have a look at Ctrl F5 (Syntax check prod) it will point out errors like this.you should have a quick look at ctrl "T" or tidy AutoIt Source in the pulldown menu of SciTE to get the script indented so it can be read a little easier then repost and we can see a bit better Edited May 5, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D
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