Problem mit dem Script

  • Mein Script ist wiefolgt

    [autoit]


    Opt("SendKeyDelay", 1)
    Opt("SendKeyDownDelay", 1)

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

    #include<misc.au3>

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

    While 1
    Sleep ( 100 )

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

    If _isPressed("A2") Then
    If _isPressed("33") Then
    Send ( ".....{enter}" )
    Send ( ".......{enter}")
    Send ( ".......{enter}")
    EndIf
    EndIf
    Wend

    [/autoit]


    Nun, ich hab ne Roccat Valo tastatur, auf der unteren Reihe M3 hab ich STRG+3 gebindet. Nun wenn ich das Sende kann ich danach mit der tastatur nichts mehr machen, außer ich drück einmal STRG.. ?
    Und das nerft richtig.. Warum? Wo liegt der Fehler?

  • keine ahnung aber du solltest ja auch strg+3 nicht so abfragen sondern mit HotKeySet
    also:

    [autoit]


    HotKeySet("^3","hotkey")
    While 1
    Sleep(100)
    Wend

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

    Func hotkey()
    Send ( ".....{enter}" )
    Send ( ".......{enter}")
    Send ( ".......{enter}")
    EndFunc

    [/autoit]
  • Und für die _IsPressed() junkies hab ich hier nochmal sie version:

    [autoit]

    #include<Misc.au3>
    While 1
    while _IsPressed("A2")
    if _IsPressed("33") Then
    MsgBox(0, "", "You Pressed STRG+3!"); Order halt was auch immer du mache willst
    Exit
    EndIf
    WEnd
    WEnd

    [/autoit]

    mfg
    Hauke