Pausieren

  • Ein weiteres Problem. Ich habe folgenden Code :

    [autoit][/autoit][autoit][/autoit][autoit]

    $pause = "{t}"

    [/autoit][autoit][/autoit][autoit]

    Hotkeyset ($pause,"pause")

    [/autoit][autoit][/autoit][autoit]

    func pause ()
    send ("{t}")
    $pause = ""
    do
    sleep (10)
    until _ispressed ("0D")
    $pause = "{t}"
    endfunc

    [/autoit]

    Beim drücken von T bekomme ich dann folgenden Fehler :

    Recursion level has been exceeded. Autoit will quit to prevent stack overflow.

    Könnt ihr mir sagen wo mein Fehler liegt ? ^^

    MFG

  • Also das mit den Klammern funktioniert nicht. Kannst du mal näher auf
    das mit dem Hotkey pausieren eingehen ? Aus der Hilfe werde ich leider nicht schlau..

    MFG

    • Offizieller Beitrag

    Schau dir doch einfach mal das Beispiel bei HotKeySet an . Da ist doch eine Pausefunktion dabei .

  • Habs mit dem Beispiel probiert klappt nicht...

    In der Hilfe ist ja das hier angegeben :

    [autoit]


    ; Drücke Esc um das Script zu beenden, Pause um es zu pausieren

    [/autoit][autoit][/autoit][autoit]

    Global $Paused
    HotKeySet("{PAUSE}", "TogglePause")
    HotKeySet("{ESC}", "Terminate")
    HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

    [/autoit][autoit][/autoit][autoit]

    ;;;; Hier ist der Hauptteil des Programms ;;;;
    While 1
    Sleep(100)
    WEnd
    ;;;;;;;;

    [/autoit][autoit][/autoit][autoit]

    Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
    sleep(100)
    ToolTip('Script ist pausiert',0,0)
    WEnd
    ToolTip("")
    EndFunc

    [/autoit][autoit][/autoit][autoit]

    Func Terminate()
    Exit 0
    EndFunc

    [/autoit][autoit][/autoit][autoit]

    Func ShowMessage()
    MsgBox(4096,"","Das ist eine Nachricht.")
    EndFunc

    [/autoit]


    Aber wie soll das Funktionieren, die variable $Paused ist doch garnicht deklariert (??)
    Bitte um weitere hilfe !

    • Offizieller Beitrag

    Die Var $Pause ist sehrwohl deklariert . Oder was meinst du warum Global $Paused im Script steht. Bei jedem aufruf der TogglePause wird der State umgedreht. Also aus True wird False und umgekehrt . Der Urspringswert ist False wenn man Global $Pause deklariert .

  • Beim drücken von T bekomme ich dann folgenden Fehler :

    Recursion level has been exceeded. Autoit will quit to prevent stack overflow.


    kannste mal mehr von deinem Skript zeigen?
    Wo genau kommt denn der Fehler (Zeile)?
    Kann es sein, das du in deinem Skript etwas zu viele Schleifen hast die ständig am laufen sind? Mir ist das bei einem anderen Thread von dir schon einmal aufgefallen.

  • Naja, habs ma ausprobiert klappt trotzdem nicht ^^
    Ka wiso nicht... Führt immernoch andere Funktionen aus..

    Nochma ausführlicher was ich will :

    Also ich hab eine zB 3 Funktionen.
    Eine davon ist Pause, Hotkey T. Wenn diese aktiv ist soll gewartet werden bis enter gedrückt wurde
    und alle anderen Hotkeys blockiert werden.

    Hoffe ihr könnt mir helfen ;)

    MFG

    Einmal editiert, zuletzt von Hellwave (12. Februar 2009 um 18:54)

    • Offizieller Beitrag

    Und für welches Game soll das wieder ein Bot werden?

    Deine beharrliche Weigerung Dein Script zu posten (in den letzten drei Threads) legt diesen Verdacht nahe.
    Vor allem habe ich mal nach diesen Teilen aus Deinem ersten Thread gegoogelt:

    [autoit]


    $readcarlock = iniread ($ini,"Settings","/carlock","")
    $readexit = iniread ($ini,"Settings","/exit","")
    $readenter = iniread ($ini,"Settings","/enter","")
    $readrespray = iniread ($ini,"Settings","/respraycar","")
    $readfix = iniread ($ini,"Settings","/fixcar","")
    $call911 = iniread ($ini,"Settings","/callpolice","")
    $readkill = iniread ($ini,"Settings","/kill","")
    $readfill = iniread ($ini,"Settings","/fill","")
    $readfuel = iniread ($ini,"Settings","/get fuel","")

    [/autoit]

    Das sieht doch sehr nach GTA aus. X(

  • Is GTA aber kein Bot.. N Keybinder..
    Und wenn du nicht helfen willst dann poste auch nicht...

    €:

    Wo sage ich "Nein" dazu meinen Code offenzulegen ?
    Echt immer das gleiche, verdächtigen ohne beweiße...

  • Is GTA aber kein Bot.. N Keybinder..
    Und wenn du nicht helfen willst dann poste auch nicht...

    €:

    Wo sage ich "Nein" dazu meinen Code offenzulegen ?
    Echt immer das gleiche, verdächtigen ohne beweiße...


    Ähm musst du hier so rumschnauzen?
    dieser Verdacht ist ganz einfach zu wiederlegen, poste doch einfach dein script
    und auch ein Keybinder ist ein bot, vergiss das nicht!

    Padmak

    • Offizieller Beitrag

    Hier ist das Scrip um das es geht.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $ini = @ScriptDir & "\config.ini"
    Opt("SendKeyDelay", 1)
    Opt("SendKeyDownDelay", 1)

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("GTAdvanced", 234, 186, 192, 127)
    $Group1 = GUICtrlCreateGroup("GTAdvanced", 8, 8, 217, 169)
    $Label1 = GUICtrlCreateLabel("Verfügbare Befehle :", 16, 32, 101, 17)
    $ComboMain = GUICtrlCreateCombo("", 16, 56, 145, 25)
    GUICtrlSetData(-1, "/carlock|/exit|/enter|/respraycar|/fixcar|/call 911 Polizei|/kill|/fill|/get fuel")
    $Button1 = GUICtrlCreateButton("Hotkey setzen", 16, 88, 83, 25, 0)
    $Label2 = GUICtrlCreateLabel("Befehle hinzufügen :", 16, 120, 101, 17)
    $Input1 = GUICtrlCreateInput("", 16, 144, 121, 21)
    $Button2 = GUICtrlCreateButton("Hinzufügen", 144, 142, 75, 25, 0)
    $Label3 = GUICtrlCreateLabel("Status :", 110, 93, 40, 17)
    $Label4 = GUICtrlCreateLabel("", 160, 93, 60, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Input1, $GUI_DISABLE)
    GUICtrlSetState($Button2, $GUI_DISABLE)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $Button1
    If GUICtrlRead($ComboMain) = "/carlock" Then

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/carlock", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd
    ElseIf GUICtrlRead($ComboMain) = "/exit" Then

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/exit", """{" & $readcombo1 & "}""")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf GUICtrlRead($ComboMain) = "/enter" Then
    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/enter", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf GUICtrlRead($ComboMain) = "/respraycar" Then

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/respraycar", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf GUICtrlRead($ComboMain) = "/fixcar" Then

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/fixcar", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf GUICtrlRead($ComboMain) = "/call 911 Polizei" Then
    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/callpolice", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf GUICtrlRead($ComboMain) = "/kill" Then
    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/kill", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf GUICtrlRead($ComboMain) = "/fill" Then

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/fill", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    GUICtrlSetData($Label4, "Erfolgreich !")
    If @error Then
    GUICtrlSetData($Label4, "Fehler !")
    EndIf
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf GUICtrlRead($ComboMain) = "/get fuel" Then
    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Hotkey setzen !", 173, 38, 234, 130)
    $Combo1 = GUICtrlCreateCombo("", 8, 8, 73, 25)
    GUICtrlSetData(-1, "Q|W|E|R|T|Z|U|I|O|P|Ü|A|S|D|F|G|H|J|K|L|L|Ö|Ä|Y|X|C|V|B|N|M|F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9")
    $OK = GUICtrlCreateButton("OK", 88, 6, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    GUISetState(@SW_HIDE)
    Case $OK
    $readcombo1 = GUICtrlRead($Combo1)
    IniWrite($ini, "Settings", "/get fuel", "{" & $readcombo1 & "}")
    GUISetState(@SW_HIDE)
    ExitLoop
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    $readcarlock = IniRead($ini, "Settings", "/carlock", "")
    $readexit = IniRead($ini, "Settings", "/exit", "")
    $readenter = IniRead($ini, "Settings", "/enter", "")
    $readrespray = IniRead($ini, "Settings", "/respraycar", "")
    $readfix = IniRead($ini, "Settings", "/fixcar", "")
    $call911 = IniRead($ini, "Settings", "/callpolice", "")
    $readkill = IniRead($ini, "Settings", "/kill", "")
    $readfill = IniRead($ini, "Settings", "/fill", "")
    $readfuel = IniRead($ini, "Settings", "/get fuel", "")
    HotKeySet($readcarlock, "carlock")
    HotKeySet($readexit, "exit_")
    HotKeySet($readenter, "enter_")
    HotKeySet($readrespray, "respraycar_")
    HotKeySet($readfix, "fixcar_")
    HotKeySet($call911, "police_")
    HotKeySet($readkill, "kill_")
    HotKeySet($readfill, "fill_")
    HotKeySet($readfuel, "getfuel_")
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func carlock()
    Send("{t}")
    Sleep(500)
    Send("/carlock")
    Send("{enter}")
    EndFunc ;==>carlock

    [/autoit] [autoit][/autoit] [autoit]

    Func exit_()
    Send("{t}")
    Send("/exit")
    Send("{enter}")
    EndFunc ;==>exit_

    [/autoit] [autoit][/autoit] [autoit]

    Func enter_()
    Send("{t}")
    Send("/enter")
    Send("{enter}")
    EndFunc ;==>enter_

    [/autoit] [autoit][/autoit] [autoit]

    Func respraycar_()
    Send("{t}")
    Send("/respraycar")
    Send("{enter}")
    EndFunc ;==>respraycar_

    [/autoit] [autoit][/autoit] [autoit]

    Func fixcar_()
    Send("{t}")
    Send("/fixcar")
    Send("{enter}")
    EndFunc ;==>fixcar_

    [/autoit] [autoit][/autoit] [autoit]

    Func police_()
    Send("{t}")
    Send("/call 911")
    Sleep(500)
    Send("Polizei")
    Send("{enter}")
    EndFunc ;==>police_

    [/autoit] [autoit][/autoit] [autoit]

    Func kill_()
    Send("{t}")
    Send("/kill")
    Send("{enter}")
    EndFunc ;==>kill_

    [/autoit] [autoit][/autoit] [autoit]

    Func fill_()
    Send("{t}")
    Send("/fill")
    Send("{enter}")
    EndFunc ;==>fill_

    [/autoit] [autoit][/autoit] [autoit]

    Func getfuel_()
    Send("{t}")
    Send("/get fuel")
    Send("{enter}")
    EndFunc ;==>getfuel_

    [/autoit] [autoit][/autoit] [autoit]

    Exit

    [/autoit]


    Hab kein Ahnung ob das ein Bot ist, oder nicht. Aber ursprünglich in diesen Thread war in dem Scrip nur der Fehler das die Pausefunktion REkursiv aufgerufen wurde. Wenn in der Pausefunktion mit Send T wieder der Hotkey gesendet wird dann ruft sich die Funktion ständig neu auf. So und jetzt hab ich keinen Bock mehr auf den Thread . Viel Spaß eim finden des Fehlers.


  • Ähm musst du hier so rumschnauzen?
    dieser Verdacht ist ganz einfach zu wiederlegen, poste doch einfach dein script
    und auch ein Keybinder ist ein bot, vergiss das nicht!

    Padmak

    What ever... Naja egal Script is ja jetzt offen... Und außerdem woher weißt du denn ob ich schnauzig bin ;)
    Ich vertrete einfach meine Meinung, muss ja nicht böse gemeint sein ;)
    Und wenn das als Bot zählt dann zählt hier alles als Bot, da ein Bot etwas automatisiert (Autoit).

    Naja wer noch hilfe hat bitte posten !

    MFG

  • Kann es sein, das du in deinem Skript etwas zu viele Schleifen hast die ständig am laufen sind? Mir ist das bei einem anderen Thread von dir schon einmal aufgefallen.


    ^^

  • Ähm ja könnte schon sein :) Raupi hat den Code doch gepostet, schaus dir bitte einfach mal an. MFG

  • Genau das ist mein Problem.
    Durch die ganzen Schleifen ist mir das Skript zu undurchsichtig. Da wird einfach zu viel wiederholt.
    Mach dich ein wenig mehr mit Funktionen vertraut. AdlibEnable würde vielleicht auch dein Problem lösen einfach zwischen Schleifen zusätzliche Abfragen zu bilden.
    Die vielen GUIs die du erstellst wiederholen sich ständig im Code. Da müsste ein wenig mehr Klarheit rein und nicht nur einfaches hintereinander setzen der Codefragmente.

    • Offizieller Beitrag

    Oh mein Gott. Is das so schwer? Schau dir mal das an, das macht was du willst . Wenn dich die Tooltips stören einfach löschen .

    Spoiler anzeigen
    [autoit]

    #include <Misc.au3>
    $pause = "t"
    Hotkeyset ($pause,"pause")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(100)
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    func pause ()
    Hotkeyset ($pause)
    send ("t")
    do
    ToolTip('Script is "Paused"',0,0)
    sleep (10)
    until _ispressed ("0D")
    Hotkeyset ($pause,"pause")
    ToolTip("")
    endfunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]
  • Jo und wenn ich jetzt nen zweiten Hotkey drücke und wird die Funktion des Hotkeys trotzdem ausgeführt ;)
    Brauch ich garnicht erst testen...

    Hoffe du weißt was ich meine.

    MFG

    • Offizieller Beitrag

    Alleine den Hintern abputzen kannst du aber schon. Sorry für meinen Sarkasmus, des muß aber sein. Wenn du dir mal die Hilfe von HotKeySet angeschaut hättest, dann wüßtest du es . Einfach alle HotKey vor dem pausieren deaktivieren. Beispiel: HotKeySet("t") würde den gesetzten Hotkey für t aufheben. Nach dem verlassen der Pause einfach wieder die HotKeys setzen und gut ist. Wenn du mein Beispiel richtig gelesen hättest, dann müßte man das dir aber nicht vorkauen.