Problem mit _IsPressed

  • Ich will in einem script abfragen ob zurzeit die Tastaur benutzt wird. Warum funzt diese Reihenfolge nicht?


    Spoiler anzeigen
    [autoit]


    $LOCK = DllOpen("user32.dll")

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

    While 1
    For $TRY = 1 To 91
    If _IsPressed($TRY, $LOCK) Or _IsPressed("0D", $LOCK) Then
    doNothing()
    EndIf
    Next

    [/autoit]
  • [autoit]

    #include <Misc.au3>

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

    $LOCK = DllOpen("user32.dll")

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

    While 1
    For $TRY = 1 To 91
    If _IsPressed(Hex($TRY), $LOCK) Or _IsPressed("0D", $LOCK) Then doNothing()
    Next
    WEnd

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

    DllClose($LOCK)

    [/autoit]