autoit hotkey funzt ned

06/11/2009 15:13 flothekilla94#1
hallo an alle
ich habe ein kleines problem....
ich bin in autoit ein anfänger und habe probiert einen bot zu schreiben der ganz gut funktioniert aber leider schaffe ich es nicht einen hotkey einzubaun... bitte helft mir

so sieht er aus
Quote:
HotKeySet ("0", "Start")

Func Start()

while True

Send(" 1 y 2 y 3 y 4 y")

Sleep(60)

WEnd

EndFunc
06/11/2009 16:08 felixli93#2
du musst noch irgendwo eine "While 1 - Sleep (100) - WEnd" - Schleife drinhaben
06/11/2009 17:57 bingbongman#3
HotKeySet("{0}", "Start")
06/11/2009 18:54 flothekilla94#4
ok danke ich werds gleich probieren
06/11/2009 20:33 Adroxxx#5
Quote:
Originally Posted by felixli93 View Post
du musst noch irgendwo eine "While 1 - Sleep (100) - WEnd" - Schleife drinhaben
Hat er doch.

While True ist While 1.
06/11/2009 20:40 flothekilla94#6
es funktioniert super mit dem while 1 sleep und wEnd danke ^^
06/11/2009 21:27 Syc0n#7
Quote:
Originally Posted by Adroxxx View Post
Hat er doch.

While True ist While 1.
Die While Schleife ist aber in einer Funktion
06/12/2009 00:04 Adroxxx#8
Quote:
Originally Posted by Syc0n View Post
Die While Schleife ist aber in einer Funktion
Oh Stimmt. Hab ich nicht drauf geachtet.
06/12/2009 10:12 flothekilla94#9
nun komm ich zu meiner nächsten frage:
wie macht man einenweitern hotkey damit der bot pausiert????

Quote:
HotKeySet ("{0}", "Start")

Hotkeyset ("{9}", "Stop")

while 1

Sleep(100)

WEnd

Func Start()

while True

Send(" 1 y 2 y 3 y 4 y")

Sleep(60)

WEnd

EndFunc

Func Stop()

while true

Sleep(100)

WEnd
06/12/2009 11:14 bingbongman#10
PHP Code:

Global $Paused

Func pause
()
    
$Paused Not $Paused
    
While $Paused
        Sleep
(100)
    
WEnd
EndFunc 
06/12/2009 11:28 Knochenfabrikant#11
#Reported.
06/12/2009 12:05 flothekilla94#12
is des dann alles so richtig?????

Quote:
HotKeySet ("{0}", "Start")

HotKeySet ("{9}", "pause")

while 1

Sleep(100)

WEnd

Func Start()

while True

Send(" 1 y 2 y 3 y 4 y")

Sleep(60)

WEnd

EndFunc

Global $Paused

Func pause()

$Paused = Not $Paused

While $Paused

Sleep(100)

WEnd

EndFunc
06/12/2009 12:18 bingbongman#13
Quote:
Originally Posted by flothekilla94 View Post
is des dann alles so richtig?????
Funktioniert´s denn nicht?
06/12/2009 13:27 flothekilla94#14
ne geht ned immer wenn ich 9 drück kommt diese fehlermeldung
und die datei wird beendet

Quote:
error 1:varibale used without being declared
06/12/2009 13:48 bingbongman#15
PHP Code:
HotKeySet ("{0}""Start")
HotKeySet ("{9}""pause")

Global 
$Paused 
while 1

Sleep
(100)

WEnd

Func Start
()

while 
True

Send
(" 1 y 2 y 3 y 4 y")

Sleep(60)

WEnd

EndFunc



Func pause
()

$Paused Not $Paused

While $Paused

Sleep
(100)

WEnd

EndFunc 
So sollte es klappen.