Help Can you take a look at my AutoIt code please ?

OptimusHasan

New member
Joined
Dec 13, 2013
Messages
1
Reaction score
0
Alright. So Im getting bunch of errors in different orders.

I had {"ENTER}" instead of  "{ENTER}". Fixed that.
Then I forgot to add EndFunc at the end of Func Pausebot. Fixed this too.
THEN I got this Error:

Line 34
EndFunc
Error: "If" statement has no matching "EndIf" statement

Code:
#RequireAdmin
HotKeySet("{F1}", "StartStop")
HotKeySet("{ESC}", "ExitBot")

$isRunning = False
$alreadyDone = 0

PauseBot()

Func PauseBot()
While True
Sleep(1000)
WEnd
EndFunc

Func StartStop()
$isRunning = Not $isRunning
If $isRunning Then
While True
Send("{ENTER}")
Sleep(250)
Send("/fish")
Sleep(250)
Send("{ENTER}")
$alreadyDone += 1
If $alreadyDone = 5 Then
Send("/throwbackall")
$alreadyDone = 0
End If
Else
PauseBot()
EndIf
WEnd
EndFunc
 
Top