|
You last visited: Today at 06:35
Advertisement
(Frage)Priodensystem Lehren mit AutoIt
Discussion on (Frage)Priodensystem Lehren mit AutoIt within the AutoIt forum part of the Coders Den category.
01/16/2011, 20:33
|
#1
|
elite*gold: 0
Join Date: Mar 2010
Posts: 146
Received Thanks: 36
|
(Frage)Priodensystem Lehren mit AutoIt
Hallo Leute Ich Hab ein Problem mit mein Script
also autoit nerft weil was mit den ElseIf nicht stimmt keine anung was
Hier Mein Script
Script
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("P.S.Bot", 191, 112, 192, 124)
GUISetBkColor(0xC0C0C0)
$Input1 = GUICtrlCreateInput("", 32, 32, 121, 21)
$Button1 = GUICtrlCreateButton("Start", 56, 56, 75, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Deine Antwort ist :", 0, 0, 90, 17)
$Label2 = GUICtrlCreateLabel("????", 96, 0, 70, 28)
GUICtrlSetFont(-1, 18, 800, 0, "Sixties")
GUICtrlSetColor(-1, 0x0000FF)
$Button2 = GUICtrlCreateButton("Exit", 56, 80, 75, 25, $WS_GROUP)
$Label3 = GUICtrlCreateLabel("By T.M.B", 136, 88, 54, 20)
GUICtrlSetFont(-1, 10, 800, 4, "Myriad Pro")
GUICtrlSetColor(-1, 0x800000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Start1()
Case $Button2
Exit 0
EndSwitch
WEnd
;Notiz:mit Do Schleife ein limet der Fehler einbauen Notiz2:bessere Gui
#cs
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
#ce
Func _Start1()
If GUICtrlRead($Input1) = "Wasserstoff" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "Lithium" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
#
ElseIf GUICtrlRead($Input1) = "Natrium" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "Kalium" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "Rubidium" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "Caesium" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "Francium" Then
GUICtrlSetData ($Label2,"Richtig")
Sleep (2000)
MsgBox(0,"Erste HaubGrube Fertig","Erste HaubGrube fertig")
EndIf
#cs
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
ElseIf GUICtrlRead($Input1) = "" Then
GUICtrlSetData ($Label2,"Richtig")
EndIf
#ce
Else
GUICtrlSetData ($Label2,"Falche")
EndIf
EndFunc
ich wollte ein Programm schreiben wo mit man Das Periodensystem Lehrnen kann wahr bin Nur bist Erste Hauptgrube gekommen
Danke schon mal an alle die mir zu helfen versuchen
|
|
|
01/16/2011, 21:01
|
#2
|
elite*gold: 29
Join Date: Nov 2010
Posts: 502
Received Thanks: 127
|
entweder du machst die ganzen Elses zu If oder du schreibst nicht nach jedem If ein EndIf..
|
|
|
01/16/2011, 21:17
|
#3
|
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
|
Oder du benutzt einfach Switch.
|
|
|
01/16/2011, 21:23
|
#4
|
elite*gold: 0
Join Date: Mar 2010
Posts: 146
Received Thanks: 36
|
Quote:
Originally Posted by u_failed
entweder du machst die ganzen Elses zu If oder du schreibst nicht nach jedem If ein EndIf..
|
hab das mit alle Elsesif zu if versucht ding schon aber zeigte alles auser wasserstoff falsche und hab auch mit Endif alle Elseif haben ein Endif bis auf das letzte wie es sein soll naja bin off hoffe das ich morgen one Fehlern weiter schreiben kann Danke an alle die mir zu helfen versuchen
|
|
|
01/17/2011, 08:18
|
#5
|
elite*gold: 20
Join Date: Oct 2010
Posts: 1,303
Received Thanks: 457
|
PHP Code:
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("P.S.Bot", 191, 112, 192, 124) GUISetBkColor(0xC0C0C0) $Input1 = GUICtrlCreateInput("", 32, 32, 121, 21) $Button1 = GUICtrlCreateButton("Start", 56, 56, 75, 25, $WS_GROUP) $Label1 = GUICtrlCreateLabel("Deine Antwort ist :", 0, 0, 90, 17) $Label2 = GUICtrlCreateLabel("????", 96, 0, 70, 28) GUICtrlSetFont(-1, 18, 800, 0, "Sixties") GUICtrlSetColor(-1, 0x0000FF) $Button2 = GUICtrlCreateButton("Exit", 56, 80, 75, 25, $WS_GROUP) $Label3 = GUICtrlCreateLabel("By T.M.B", 136, 88, 54, 20) GUICtrlSetFont(-1, 10, 800, 4, "Myriad Pro") GUICtrlSetColor(-1, 0x800000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _Start1() Case $Button2 Exit 0 EndSwitch WEnd ;Notiz:mit Do Schleife ein limet der Fehler einbauen Notiz2:bessere Gui #cs ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf #ce Func _Start1()
If GUICtrlRead($Input1) = "Wasserstoff" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Lithium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Natrium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Kalium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Rubidium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Caesium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Francium" Then GUICtrlSetData ($Label2,"Richtig") Sleep (2000) MsgBox(0,"Erste HaubGrube Fertig","Erste HaubGrube fertig") #cs EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf #ce Else GUICtrlSetData ($Label2,"Falche") EndIf EndFunc
|
|
|
01/17/2011, 12:15
|
#6
|
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
|
Habs mal gekürzt:
Code:
Dim $aPS[7] = ["Wasserstoff", "Lithium", "Natrium", "Kalium", "Rubidium", "Caesium", "Francium"]
$Form1 = GUICreate("P.S.Bot", 191, 112, 192, 124)
GUISetBkColor(0xC0C0C0)
$Input1 = GUICtrlCreateInput("", 32, 32, 121, 21)
$Button1 = GUICtrlCreateButton("Start", 56, 56, 75, 25)
$Label1 = GUICtrlCreateLabel("Deine Antwort ist :", 0, 0, 90, 17)
$Label2 = GUICtrlCreateLabel("????", 96, 0, 70, 28)
GUICtrlSetFont(-1, 18, 800, 0, "Sixties")
GUICtrlSetColor(-1, 0x0000FF)
$Button2 = GUICtrlCreateButton("Exit", 56, 80, 75, 25)
$Label3 = GUICtrlCreateLabel("By T.M.B", 136, 88, 54, 20)
GUICtrlSetFont(-1, 10, 800, 4, "Myriad Pro")
GUICtrlSetColor(-1, 0x800000)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
_Start1()
Case $Button2
Exit
EndSwitch
WEnd
;Notiz:mit Do Schleife ein limet der Fehler einbauen Notiz2:bessere Gui
Func _Start1()
For $i = 0 To 6
If GUICtrlRead($Input1) = $aPS[$i] Then
GUICtrlSetData($Label2, "Richtig")
ExitLoop
Else
GUICtrlSetData($Label2, "Falsch")
EndIf
Next
EndFunc ;==>_Start1
|
|
|
01/17/2011, 16:54
|
#7
|
elite*gold: 0
Join Date: Mar 2010
Posts: 146
Received Thanks: 36
|
Quote:
Originally Posted by .2good4you111
PHP Code:
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("P.S.Bot", 191, 112, 192, 124) GUISetBkColor(0xC0C0C0) $Input1 = GUICtrlCreateInput("", 32, 32, 121, 21) $Button1 = GUICtrlCreateButton("Start", 56, 56, 75, 25, $WS_GROUP) $Label1 = GUICtrlCreateLabel("Deine Antwort ist :", 0, 0, 90, 17) $Label2 = GUICtrlCreateLabel("????", 96, 0, 70, 28) GUICtrlSetFont(-1, 18, 800, 0, "Sixties") GUICtrlSetColor(-1, 0x0000FF) $Button2 = GUICtrlCreateButton("Exit", 56, 80, 75, 25, $WS_GROUP) $Label3 = GUICtrlCreateLabel("By T.M.B", 136, 88, 54, 20) GUICtrlSetFont(-1, 10, 800, 4, "Myriad Pro") GUICtrlSetColor(-1, 0x800000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _Start1() Case $Button2 Exit 0 EndSwitch WEnd ;Notiz:mit Do Schleife ein limet der Fehler einbauen Notiz2:bessere Gui #cs ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf #ce Func _Start1()
If GUICtrlRead($Input1) = "Wasserstoff" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Lithium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Natrium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Kalium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Rubidium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Caesium" Then GUICtrlSetData ($Label2,"Richtig") ElseIf GUICtrlRead($Input1) = "Francium" Then GUICtrlSetData ($Label2,"Richtig") Sleep (2000) MsgBox(0,"Erste HaubGrube Fertig","Erste HaubGrube fertig") #cs EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf ElseIf GUICtrlRead($Input1) = "" Then GUICtrlSetData ($Label2,"Richtig") EndIf #ce Else GUICtrlSetData ($Label2,"Falche") EndIf EndFunc
|
ich Danke dir eine frage was hatte ich Falsche gemacht????
jetzt geht es
|
|
|
01/17/2011, 17:51
|
#8
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,254
|
du hast die if abfrage einfach falsch gemacht...
PHP Code:
If $a = "a" Then ;;; EndIf If $b = "b" Then ;;; EndIf
oder
If $a = "a" Then ;; ;du hattest immer noch endif´s hierszwischen, da kannst du dann keine "Else"-If´s anwenden ElseIf $b = "b" Then ;; EndIf
|
|
|
01/17/2011, 18:57
|
#9
|
elite*gold: 0
Join Date: Mar 2010
Posts: 146
Received Thanks: 36
|
Quote:
Originally Posted by omer36
du hast die if abfrage einfach falsch gemacht...
PHP Code:
If $a = "a" Then ;;; EndIf If $b = "b" Then ;;; EndIf oder If $a = "a" Then ;; ;du hattest immer noch endif´s hierszwischen, da kannst du dann keine "Else"-If´s anwenden ElseIf $b = "b" Then ;; EndIf
|
Aso danke
hab jetzt kapiert danke an alle
|
|
|
Similar Threads
|
verkaufe lehren katargo acc
01/18/2010 - elite*gold Trading - 0 Replies
also hallo ich verkaufe euch leeren metin2 acc (katargo) da man ja keine mehr erstellen kann verkaufe ich meinen er is blank wie viel elite gold bietet ihr mir
|
Lehren gehen nicht
11/02/2009 - Metin2 Private Server - 2 Replies
hey
nach einen reboot von mir gehen die lehren nicht mehr man kann sie nach dem lvl 5 nicht mehr auswählen und wenn man danach reboot macht bleibt es gleich...
kan mir jemand bitte helfen
|
All times are GMT +2. The time now is 06:35.
|
|