Warum bekomme ich einenError hilfe!!!

  • Hier mal der Code

    Spoiler anzeigen

    #include <Misc.au3>
    $dll = DllOpen("user32.dll")

    While 1
    If _IsPressed("6A", $dll) Then
    While 1
    Send("{F1}")
    Send("{F2}")

    While 1

    $var = PixelGetColor( 855 , 174 )
    If $var = 0 Then

    Sleep(3000)
    ;MsgBox(0,"The decmial color is", $var)
    Send ( "{SPACE}" )
    Sleep(4500)
    EndIf
    WEnd
    WEnd
    WEnd
    DllClose($dll)


    Was ist daran falsch.

  • Hallo schlimm23,

    herzlich willkommen im Forum und viel Spass mit AutoIt.

    Hier kannst du dir die deutsche Hilfe herunterladen.
    Hier gibt es ein AutoIt-Tutorial: http://wiki.autoit.de/wiki/index.php/TutorialSehr hilfreich ist auch das Buch von peethebee

    und jetzt zu deiner Frage: du hast ein EndIf vergessen, das Skript muss so aussehen:

    Spoiler anzeigen
    [autoit]

    #include <Misc.au3>
    $dll = DllOpen("user32.dll")

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

    While 1
    If _IsPressed("6A", $dll) Then
    While 1
    Send("{F1}")
    Send("{F2}")

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

    While 1

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

    $var = PixelGetColor(855, 174)
    If $var = 0 Then

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

    Sleep(3000)
    ;MsgBox(0,"The decmial color is", $var)
    Send("{SPACE}")
    Sleep(4500)
    EndIf
    WEnd
    WEnd
    EndIf ;<================ Diese End If hat gefehlt
    WEnd
    DllClose($dll)

    [/autoit]

    wenn du deinen Skriptcode dem Syntax entsprechend ein- und ach wieder ausrückst fäll dassleichter auf. Du kannst auch das Tidy-Tool von Scite benutzem (CTRL-T) das erledigt dies für dich bzw. zeigt dir Fehler an.

    mfg autoBert