Input Box für Passwörter in einer GUI?

09/29/2010 17:01 Kaqqy147#1
Hey Leute ich habe ein Prob...
Ich weiß das man eine InputBox verschlüsseln kann, nämlich folgender Maßen:
Code:
InputBox ("Titel", "Text", "", "*")
Das Prob ist nur das eine Inputbox in einer Gui nicht so aufgebaut ist...
Kann mir einer sagen wie ich dort die InputBox verschlüssel?

lg,Kaqqy147
09/29/2010 17:17 omer36#2
$Input1 = GUICtrlCreateInput("Input1", 96, 100, 169, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
09/29/2010 17:27 maxi39#3
guck doch mal im koda-formdesigner unter styles
09/29/2010 17:39 Kaqqy147#4
thanks aber anderes Prob...
Nun sagte er das er die Variabeln nicht kennt also die fürs PW verdecken...
Was muss ich dafür includen???
09/29/2010 17:47 omer36#5
PHP Code:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 443, 192, 124)
GUICtrlCreateInput("", 44, 88, 197, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd 
09/29/2010 17:54 Kaqqy147#6
Auch das Klappt super Danke!
Noch eine letzte Frage:
Ich habe in einer Gui 3 InputBoxen und einen Button.
Auf Buttondruck soll er die Werte der Inputboxen in eine Ini schreiben.
Alles was ankommt ist das:
Quote:
[Login]
Login=8 (ich habe hier kaqqy angegeben)
Passwort=9 (ich habe hier testpw angegeben)
Klassenstufe=10 (ich habe hier 8 angegeben)
Kann mir einer helfen?
09/29/2010 18:05 Mozo_#7
Ich denke mit deinem Code könnten wir die mehr helfen ;)
09/29/2010 18:11 Kaqqy147#8
Code:
#Region ### START Koda GUI section ###
$Form3 = GUICreate("Registrieren", 181, 158, 191, 122)
GUISetBkColor(0x3D95FF)
$Input1 = GUICtrlCreateInput("Login", 32, 16, 105, 21)
$Input2 = GUICtrlCreateInput("Passwort", 32, 48, 105, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$Input3 = GUICtrlCreateInput("Klassenstufe", 32, 80, 105, 21)
$Button1 = GUICtrlCreateButton("Registrieren", 48, 112, 73, 25, 0)
GUISetState(@SW_SHOW, $Form3)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
		Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			IniWrite (@UserProfileDir &"Vokabeln.ini", "Login", "Login", $Input1)
			IniWrite (@UserProfileDir &"Vokabeln.ini", "Login", "Passwort", $Input2)
			IniWrite (@UserProfileDir &"Vokabeln.ini", "Login", "Klassenstufe", $Input3)
			Exit
	EndSwitch
WEnd
09/29/2010 19:20 omer36#9
hier ein kleines bsp..
kannst es dir bestimmt zusammen reimen.. ^^

PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 372, 188, 192, 124)
$Input1 = GUICtrlCreateInput("name", 24, 52, 121, 21)
$Input2 = GUICtrlCreateInput("password", 24, 92, 121, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("speichern", 176, 50, 95, 30, $WS_GROUP)
$Button2 = GUICtrlCreateButton("laden", 176, 90, 95, 30, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Start", 275, 75, 95, 30, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Global $Ini = @ScriptDir & "\save.ini"
Global $name = IniRead($ini, "NAME", "name", "")
Global 
$password = IniRead($ini, "PASSWORD", "password", "")

While 
1
    $nMsg 
= GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            speichern
()
        Case 
$Button2
            GUICtrlSetData
($Input1, $name)
            
GUICtrlSetData($Input2, $password)
        Case 
$Button3
            start
()
EndSwitch
WEnd

Func speichern
()
IniWrite($ini, "NAME", "name", GUICtrlRead($Input1))
IniWrite($ini, "PASSWORD", "password", GUICtrlRead($Input2))
EndFunc

Func start
()
;;
EndFunc 
10/01/2010 12:44 Kaqqy147#10
Thanks hat geklappt. Mod kann dann closen!