AutoItSetOption("WinTitleMatchMode", 4)
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
$windowname="World of Warcraft"
$handle = WinGetHandle($windowname, "")
If @error Then
MsgBox(4096, "Error", "Could not find the correct window")
Else
while 1
ControlSend($windowname,'','',"Hi")
sleep(1500)
WEnd
Func TogglePause()
$Paused = Not $Paused
While $Paused
sleep(100)
WEnd
EndFunc
Func Terminate()
Exit 0
EndFunc
EndIf
Beim starten kommt die meldung:
Line 16 (XXXXXXXX) :
Func TogglePause()
Error: "If" statement has no matching "EndIf" statement.
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
$windowname="World of Warcraft"
$handle = WinGetHandle($windowname, "")
If @error Then
MsgBox(4096, "Error", "Could not find the correct window")
Else
while 1
ControlSend($windowname,'','',"Hi")
sleep(1500)
WEnd
Func TogglePause()
$Paused = Not $Paused
While $Paused
sleep(100)
WEnd
EndFunc
Func Terminate()
Exit 0
EndFunc
EndIf
Beim starten kommt die meldung:
Line 16 (XXXXXXXX) :
Func TogglePause()
Error: "If" statement has no matching "EndIf" statement.