Code:
HotKeySet("{ENTER}", "enter") Global $scriptactive = True Global $entercounter = 0 Func enter() Send("{ENTER}") $scriptactive = False $entercounter += 1 If mod($entercounter, 2) == 0 Then $scriptactive = True EndIf EndFunc
wenn ich enter drücke, wird der hotkey geblockt. mit anderen tasten geht das auch. zb
Code:
HotKeySet("q", "skillq") Global $scriptactive = True Func skillq() If $scriptactive == True Then Send("c") Else Send("q") EndIf EndFunc
btw: ich kann beim enterdrücken alles senden zb send("1"), send("{NUMPAD3}"), usw, aber nur nicht send("{ENTER}").
vielen dank für die hilfe ^^
nochma das gesamte script:
Code:
HotKeySet("q", "skillq") ;skill 1 HotKeySet("w", "skillw") ;skill 2 HotKeySet("r", "skillw") ;skill 4 HotKeySet("{NUMPAD3}", "ende") ;to exit bot HotKeySet("{ENTER}", "enter") ;to exit bot Global $scriptactive = True Global $entercounter = 0 Func skillq() If $scriptactive == True Then Send("c") Else Send("q") EndIf EndFunc Func skillw() If $scriptactive == True Then Send("e") Else Send("w") EndIf EndFunc Func skillr() If $scriptactive == True Then Send("d") Else Send("r") EndIf EndFunc Func enter() Send("{ENTER}") $scriptactive = False $entercounter += 1 If mod($entercounter, 2) == 0 Then $scriptactive = True EndIf EndFunc Func ende() Exit EndFunc While 1 sleep(1) WEnd