Fehler beim eigenen Script

09/08/2010 17:44 B-O#1
Hallo, ich habe heute mein ersten Script geschrieben,
es ist ein GUI das die Programme auf den Buttons öffnen soll.
Aber da ist ein error wenn ich ihn starten will:


Quote:
Line 765 (File ""):

Error: "While" statement has no matching "Wend" statement.
Dies ist mein Script:


Könnte mir wer sagen wo der Fehler lieg?
Wäre sehr nett.

Das ist mein erster Script.

Freue mich über jede Hilfe.

B-O
09/08/2010 17:52 kknb#2
das liegt daran das du das script fürs gui da 2 mal reinkopiert hast, und die schleife in der mitte zur hälfte fehlt.
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Programmöffner", 476, 337, 344, 216)
$Button1 = GUICtrlCreateButton("FireFox", 32, 56, 97, 41, $WS_GROUP)
$Button2 = GUICtrlCreateButton("InternetExplorer", 32, 112, 97, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Opera", 32, 168, 97, 41, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Games", 312, 16, 97, 29)
GUICtrlSetFont(-1, 20, 400, 0, "Make Juice")
GUICtrlSetBkColor(-1, 0xFF0000)
$Button4 = GUICtrlCreateButton("NosTale", 312, 56, 99, 41, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Dragonica", 312, 112, 97, 41, $WS_GROUP)
$Button6 = GUICtrlCreateButton("S4 League", 312, 168, 97, 41, $WS_GROUP)
$Label2 = GUICtrlCreateLabel("Other", 192, 192, 78, 32)
GUICtrlSetFont(-1, 18, 400, 0, "Make Juice")
GUICtrlSetBkColor(-1, 0xFF0000)
$Button7 = GUICtrlCreateButton("Skype", 32, 248, 99, 41, $WS_GROUP)
$Button8 = GUICtrlCreateButton("Thunderbird", 184, 248, 91, 41, $WS_GROUP)
$Button9 = GUICtrlCreateButton("Gimp", 312, 248, 97, 41, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("Internet Browser", 24, 16, 202, 29)
GUICtrlSetFont(-1, 16, 400, 0, "Make Juice")
GUICtrlSetBkColor(-1, 0xFF0000)
$Pic1 = GUICtrlCreatePic("C:\Dokumente und Einstellungen\User\Eigene Dateien\Eigene Bilder\anime\8.jpeg", 136, 56, 169, 129, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label4 = GUICtrlCreateLabel("By Jonas", 416, 312, 54, 17)
GUICtrlSetFont(-1, 8, 400, 0, "Make Juice")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Button1
            shellexecute("firefox.exe")

        Case $Button2
            shellexecute("iexplore.exe")

        Case $Button3
            shellexecute("opera.exe")

        Case $Button4
            shellexecute("nostale.exe")

        Case $Button5
            shellexecute("dragonica.exe")

        Case $Button6
            shellexecute("s4league.exe")

        Case $Button7
            shellexecute("skype.exe")

        Case $Button8
            shellexecute("thunderbird.exe")

        Case $Button9
            shellexecute("gimp.exe")

    EndSwitch
WEnd
bitte
09/08/2010 17:56 luckkylooser#3
Ähm. Du hast 2mal das gleiche Script hintereinander falls es dir ned aufgefallen ist.

Einfach das obere löschen:

So klappts:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Programmöffner"476337344216)
$Button1 GUICtrlCreateButton("FireFox"32569741$WS_GROUP)
$Button2 GUICtrlCreateButton("InternetExplorer"321129741$WS_GROUP)
$Button3 GUICtrlCreateButton("Opera"321689741$WS_GROUP)
$Label1 GUICtrlCreateLabel("Games"312169729)
GUICtrlSetFont(-1204000"Make Juice")
GUICtrlSetBkColor(-10xFF0000)
$Button4 GUICtrlCreateButton("NosTale"312569941$WS_GROUP)
$Button5 GUICtrlCreateButton("Dragonica"3121129741$WS_GROUP)
$Button6 GUICtrlCreateButton("S4 League"3121689741$WS_GROUP)
$Label2 GUICtrlCreateLabel("Other"1921927832)
GUICtrlSetFont(-1184000"Make Juice")
GUICtrlSetBkColor(-10xFF0000)
$Button7 GUICtrlCreateButton("Skype"322489941$WS_GROUP)
$Button8 GUICtrlCreateButton("Thunderbird"1842489141$WS_GROUP)
$Button9 GUICtrlCreateButton("Gimp"3122489741$WS_GROUP)
$Label3 GUICtrlCreateLabel("Internet Browser"241620229)
GUICtrlSetFont(-1164000"Make Juice")
GUICtrlSetBkColor(-10xFF0000)
$Pic1 GUICtrlCreatePic("C:\Dokumente und Einstellungen\Jonas\Eigene Dateien\Eigene Bilder\anime\8.jpeg"13656169129BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label4 GUICtrlCreateLabel("By B-O"4163125417)
GUICtrlSetFont(-184000"Make Juice")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            shellexecute
("firefox.exe")

        Case 
$Button2
            shellexecute
("iexplore.exe")

        Case 
$Button3
            shellexecute
("opera.exe")

        Case 
$Button4
            shellexecute
("nostale.exe")

        Case 
$Button5
            shellexecute
("dragonica.exe")

        Case 
$Button6
            shellexecute
("s4league.exe")

        Case 
$Button7
            shellexecute
("skype.exe")

        Case 
$Button8
            shellexecute
("thunderbird.exe")

        Case 
$Button9
            shellexecute
("gimp.exe")

    EndSwitch
WEnd 
09/08/2010 17:58 B-O#4
Danke leute habt beide nen thanks^^
manchmal bibn ich auchn bisschen doof <.<

kann geclosed werden