|
You last visited: Today at 08:56
Advertisement
Fehler beim eigenen Script
Discussion on Fehler beim eigenen Script within the AutoIt forum part of the Coders Den category.
09/08/2010, 17:44
|
#1
|
elite*gold: 0
Join Date: Apr 2010
Posts: 431
Received Thanks: 138
|
Fehler beim eigenen Script
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:
PHP 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)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
#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\Jonas\Eigene Dateien\Eigene Bilder\anime\8.jpeg", 136, 56, 169, 129, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label4 = GUICtrlCreateLabel("By B-O", 416, 312, 54, 17)
GUICtrlSetFont(-1, 8, 400, 0, "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
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
|
#2
|
elite*gold: 20
Join Date: Feb 2007
Posts: 3,080
Received Thanks: 4,294
|
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
|
#3
|
elite*gold: 0
Join Date: Mar 2010
Posts: 79
Received Thanks: 32
|
Ä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", 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\Jonas\Eigene Dateien\Eigene Bilder\anime\8.jpeg", 136, 56, 169, 129, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Label4 = GUICtrlCreateLabel("By B-O", 416, 312, 54, 17) GUICtrlSetFont(-1, 8, 400, 0, "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
|
#4
|
elite*gold: 0
Join Date: Apr 2010
Posts: 431
Received Thanks: 138
|
Danke leute habt beide nen thanks^^
manchmal bibn ich auchn bisschen doof <.<
kann geclosed werden
|
|
|
 |
Similar Threads
|
Fehler bei meinem eigenen Pserver pls help
09/09/2010 - Metin2 Private Server - 7 Replies
Also ich und mein kumpel haben einen server erstellt der ging auch und der läuft von 1900mb ram.
Also zeit heute wen ich mich auf mein server einloggen will steht da nur noch " du wirst mit dem server verbunden" :mad: stunden lang
Portmaps richtig mc.txt richtig es ging ja noch bis vorhin alles dan hat mein kumpel pc neu angemacht wollte server anmachen und zeit dem kam das :mad: pls help hab auch teamviewer schätze das problem haben viele aba ich will pls ne lösung die funktioniert...
|
Frage zu Eigenen P-server - Fehler
08/09/2010 - Metin2 Private Server - 0 Replies
hallo.
Ein freund von mir hatt sich auf meinen server in ne anderre map geportet und kommt jetzt nach carauswahl nichtmehr rein ^^
wie bekomm ich den wieder map1 oder das es halt wieder geht?
Mfg.
|
Beim Eigenen Server Fehler beim Verbinden mit dem Server
02/24/2010 - Metin2 Private Server - 3 Replies
Hallo,
Habe ein Problem wenn cih mein Metin2 Starten will komm da Fehler beim verbinden mit dem Server bitte um Hilfe über Team Viewer daten gibts über pn danke
|
habe fehler beim eigenen server!
10/03/2009 - Metin2 Private Server - 2 Replies
bei mir stehe wenn ich VPC starte nich genung speicher bei Host
oder so was änliches alles andere geht ausser das
kann mich wer helfen??
|
Fehler beim Öffnen des Eigenen Servers
09/28/2009 - Metin2 Private Server - 4 Replies
Hallo liebe Com!
Ich hab ein problem!
Was bedeute das?
http://img30.imageshack.us/img30/4971/fehlermx.jp g
Könnt mir jmd helfen?
MfG
|
All times are GMT +1. The time now is 08:57.
|
|