habe eine frage zu einer login form

04/01/2010 00:59 wr verkäufer#1
hey brauche hilfe will das wenn man die richtigen daten angibt das sich dann eine mdgbox öffnet aber es klappt nicht pls helft mir thx
ich weiß da klappt vieles noch nicht pls helft mir bei der else und mit der func _login pls helft mir


Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Login SVZ Designer by Chriss               [Chrisslb Crew ]", 465, 166, 268, 238)
GUISetBkColor(0xA6CAF0)
$Label1 = GUICtrlCreateLabel("Benutzer :", 16, 0, 90, 27)
GUICtrlSetFont(-1, 16, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetState(-1, $GUI_DISABLE)
$Input1 = GUICtrlCreateInput("Benutzerkonto", 8, 32, 321, 32)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Laber2 = GUICtrlCreateLabel("Passwort :", 12, 78, 91, 27)
GUICtrlSetFont(-1, 16, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetState(-1, $GUI_DISABLE)
$Input2 = GUICtrlCreateInput("Passwort ", 12, 118, 321, 32)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Login", 360, 32, 97, 33, 0)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Exit", 359, 116, 97, 33, 0)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		case $Button1 
			_login ()
		case $Button2 
			_lol ()

	EndSwitch
WEnd

func _login ()
		IF $Input = ("Benutzerkonto") and $Input2 = ("Passwort") Then 
			msgbox (64,"Hallo","Willkommen")
			endif
		Else 
			Msgbox (1,"Error","Benutzer oder Passwort ist Falsch ")

EndFunc

func _lol ()
	msgbox (48,"credis ","credis by  chrisslb")
	Exit
endfunc


thx im vorraus
04/01/2010 11:57 sulak#2
Quote:
>C:\Program Files\AutoIt3\SciTE\..\au3check.exe "C:\Users\..\Desktop\k.au3"
AutoIt3 Syntax Checker v1.54.8 Copyright (c) Tylo 2007

C:\Users\..\Desktop\k.au3(39,13) : WARNING: $Input: possibly used before declaration.
IF $Input =
~~~~~~~~~~^
C:\Users\..\Desktop\k.au3(42,3) : ERROR: syntax error
Else
^
C:\Users\..\Desktop\k.au3(39,13) : ERROR: $Input: undeclared global variable.
IF $Input =
~~~~~~~~~~^
C:\Users\..\Desktop\k.au3(33,10) : ERROR: _lol(): undefined function.
_lol ()
~~~~~~^
C:\Users\..\Desktop\k.au3 - 3 error(s), 1 warning(s)
>Exit code: 2 Time: 0.710
Ich würde erst die Fehler beheben
04/01/2010 14:56 kknb#3
Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Login SVZ Designer by Chriss               [Chrisslb Crew ]", 465, 166, 268, 238)
GUISetBkColor(0xA6CAF0)
$Label1 = GUICtrlCreateLabel("Benutzer :", 16, 0, 90, 27)
GUICtrlSetFont(-1, 16, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetState(-1, $GUI_DISABLE)
$Input1 = GUICtrlCreateInput("Benutzerkonto", 8, 32, 321, 32)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Laber2 = GUICtrlCreateLabel("Passwort :", 12, 78, 91, 27)
GUICtrlSetFont(-1, 16, 400, 0, "Times New Roman")
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetState(-1, $GUI_DISABLE)
$Input2 = GUICtrlCreateInput("Passwort", 12, 118, 321, 32)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Login", 360, 32, 97, 33, 0)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Exit", 359, 116, 97, 33, 0)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		case $Button1
			_login ()
		case $Button2
			msgbox (48,"credis ","credis by  chrisslb")
			Exit
	EndSwitch
WEnd

func _login ()
		if guictrlread($Input1) ="Benutzerkonto" and guictrlread($Input2) = "Passwort" Then
			msgbox (64,"Hallo","Willkommen")
		Else
			Msgbox (1,"Error","Benutzer oder Passwort ist Falsch ")
		EndIf
EndFunc