if in folge

  • HI ich möchte gerne eine kleine "lichtergui" erstellen
    jedoch scheiter ich schon am beispiel
    wie bringe ich die tasten alle in die while

    danke für die hilfe

    [autoit]

    #include <Misc.au3>

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

    $dll = DllOpen("user32.dll")

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

    While 1
    Sleep ( 250 )
    If _IsPressed("52", $dll) Then
    MsgBox(0,"_IsPressed", "r wurde gedrückt.")
    If _IsPressed("54", $dll) Then
    MsgBox(0,"_IsPressed", "t wurde gedrückt.")
    If _IsPressed("53", $dll) Then
    MsgBox(0,"_IsPressed", "s wurde gedrückt.")

    EndIf
    EndIf
    EndIf
    WEnd
    DllClose($dll)

    [/autoit]
  • So in der Art? Denn in deiner Form müssen r+t+s gedrückt werden, damit "s wurde gedrückt" angezeigt wird ;)

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

    #include <Misc.au3>

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

    $dll = DllOpen("user32.dll")

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

    While 1
    Sleep ( 250 )
    If _IsPressed("52", $dll) Then
    MsgBox(0,"_IsPressed", "r wurde gedrückt.")
    EndIf

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

    If _IsPressed("54", $dll) Then
    MsgBox(0,"_IsPressed", "t wurde gedrückt.")
    EndIf
    If _IsPressed("53", $dll) Then
    MsgBox(0,"_IsPressed", "s wurde gedrückt.")
    EndIf

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

    WEnd
    DllClose($dll)

    [/autoit]
  • In dem Fall funktioniert's auch so:

    Spoiler anzeigen
    [autoit]

    #include <Misc.au3>

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

    $dll = DllOpen("user32.dll")

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

    While 1
    Sleep ( 250 )
    If _IsPressed("52", $dll) Then MsgBox(0,"_IsPressed", "r wurde gedrückt.")
    If _IsPressed("54", $dll) Then MsgBox(0,"_IsPressed", "t wurde gedrückt.")
    If _IsPressed("53", $dll) Then MsgBox(0,"_IsPressed", "s wurde gedrückt.")
    WEnd
    DllClose($dll)

    [/autoit]
    UNPLEASANT SPOILER

    You just lost the game!