Problem mit IniRead und Hide/Show.

01/28/2011 17:47 .Moskito#1
Ich habe mich seit einer langen seit mal wieder an Autoit gesetzt und auch gleich etwas ordentliches versucht...
nur bin ich nach kurzer Zeit schon auf die ersten Problemchen gestoßen...

vorerst einmal der Script:

Nun, kommen wir zu den Problemen:
1. Im Menü, man wählt erst Create Account und dann Log In aus, jedoch überlappen sich die beiden Controls dann leider.
Und mit Show/Hide hat es nicht geklappt <.<

2. Wenn ich einen Account erstelle, und dann einloggen will, wird immer angezeigt, dass das pw nicht stimmt (Id hab ich erstmal außenvor gelassen..).

Ich hoffe euch fällt dazu eine Lösung ein, Danke im Vorraus.

Ps: Ja, ich weiß ist ein wenig umständlich geschrieben, aber wie oben genannt, nach einer Zeit verlenrt man's <.<
01/28/2011 18:13 omer36#2
geht auch besser, zb mit 2 weiteren gui´s, die dann einfach @sw_hide bzw @sw_show machen kannst, aber so gehts auch:

PHP Code:
#include <GUIConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <File.au3>
#include <Array.au3>

$Form1 GUICreate("frogiih's World"81855900)
GUISetBkColor(0xABABAB)
$Progress1 GUICtrlCreateProgress(05288149)
DirCreate("C:\\program files\frogiih's World")

$button_gesinnung GUICtrlCreateButton("Gesinnung"7361207525)
$button_fertigkeiten GUICtrlCreateButton("Fertigkeiten"736967525)
$button_option GUICtrlCreateButton("Optionen"736727525)
GUICtrlSetState($button_gesinnung$GUI_DISABLE)
GUICtrlSetState($button_option$GUI_DISABLE)
GUICtrlSetState($button_fertigkeiten$GUI_DISABLE)

$Group_action GUICtrlCreateGroup("Aktivität"8160540361)
$action GUICtrlCreatePic(""16184524329)
GUICtrlCreateGroup("", -99, -9911)

$Group_welt GUICtrlCreateGroup("Welt"88185145)
$pic_map GUICtrlCreatePic(""1632164108)
GUICtrlCreateGroup("", -99, -9911)


$pic_head GUICtrlCreatePic(""1928356132)
$Group_auswahl GUICtrlCreateGroup("Auswahl"552160265361)

$MenuItem_acc GUICtrlCreateMenu("Account")
$MenuItem_cre_acc GUICtrlCreateMenuItem("Create Account"$MenuItem_acc)
$MenuItem_login GUICtrlCreateMenuItem("Log In"$MenuItem_acc)
$MenuItem_help GUICtrlCreateMenu("Help")
$MenuItem_how GUICtrlCreateMenuItem("How To Play"$MenuItem_help)

$txt_name GUICtrlCreateLabel("Name:"560803517)
$txt_Rasse GUICtrlCreateLabel("Rasse:"5601003717)
$txt_geschlecht GUICtrlCreateLabel("Geschlecht"5601205817)

$input_name GUICtrlCreateInput("-"6248010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_rasse GUICtrlCreateInput("-"62410010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_geschlecht GUICtrlCreateInput("-"62412010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)

Controls #########################Login###################
$txt_login GUICtrlCreateLabel("Join the Game!"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$input_id GUICtrlCreateInput("ID"58424820921)
GUICtrlSetState(-1$GUI_HIDE)
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
GUICtrlSetState(-1$GUI_HIDE)
$button_join GUICtrlCreateButton("Join"5923527525)
GUICtrlSetState(-1$GUI_HIDE)
Controls ########################Login##################End

Controls ########################Cre_acc################
$cre_input_id GUICtrlCreateInput("ID"58423220921)
GUICtrlSetState(-1$GUI_HIDE)
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
GUICtrlSetState(-1$GUI_HIDE)
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
GUICtrlSetState(-1$GUI_HIDE)
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
GUICtrlSetState(-1$GUI_HIDE)
GUICtrlCreateGroup("", -99, -9911)
Controls #######################Cre_acc#################End



GUISetState(@SW_SHOW)


While 
1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$MenuItem_cre_acc
            $cre_input_id 
GUICtrlCreateInput("ID"58423220921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
GUICtrlCreateGroup("", -99, -9911)

            
GUICtrlSetState($txt_login  $GUI_HIDE)
            
GUICtrlSetState($input_id  $GUI_HIDE)
            
GUICtrlSetState($input_pw  $GUI_HIDE)
            
GUICtrlSetState($checkbox_save  $GUI_HIDE)
            
GUICtrlSetState($button_cancel2  $GUI_HIDE)
            
GUICtrlSetState($button_join  $GUI_HIDE)


        Case 
$MenuItem_login
            $txt_login 
GUICtrlCreateLabel("Join the Game!"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_id GUICtrlCreateInput("ID"58424820921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_join GUICtrlCreateButton("Join"5923527525)
            
GUICtrlSetState(-1$GUI_SHOW)

            
GUICtrlSetState($cre_input_id  $GUI_HIDE)
            
GUICtrlSetState($cre_input_pw  $GUI_HIDE)
            
GUICtrlSetState($txt_cre_acc  $GUI_HIDE)
            
GUICtrlSetState($button_cancel  $GUI_HIDE)
            
GUICtrlSetState($button_confirm  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_M  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_W  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse1  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse2  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse3  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse4  $GUI_HIDE)


        Case 
$button_join
            $pw2 
IniRead("C:\program files\Daten.ini""Daten""pw""")
            
$pw3 _StringEncrypt(0$pw2"lolator")
            If 
$input_pw $pw3 Then
                TrayTip
("frogiih's World""Einloggen Erfolgreich. Daten werden geladen..."10000)
            Else
                
TrayTip("frogiih's World""Achtung! Deine Angegebenen Daten stimmen nicht überein. Bitte überprüfe diese."10000)
            EndIf

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_confirm
            $id1 
_StringEncrypt(1$cre_input_id"lolator")
            
IniWrite("C:\program files\frogiih's World\Daten.ini""Daten""id"$id1)
            
$pw1 _StringEncrypt(1$cre_input_pw"lolator")
            
IniWrite("C:\program files\frogiih's World\Daten.ini""Daten""pw"$pw1)

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_gesinnung
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_fertigkeiten
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_option
            $Inhalt 
GUICtrlCreatePic(""560152252364)
    EndSwitch
WEnd 
01/28/2011 18:31 .Moskito#3
Quote:
Originally Posted by omer36 View Post
geht auch besser, zb mit 2 weiteren gui´s, die dann einfach @sw_hide bzw @sw_show machen kannst, aber so gehts auch:

PHP Code:
#include <GUIConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <File.au3>
#include <Array.au3>

$Form1 GUICreate("frogiih's World"81855900)
GUISetBkColor(0xABABAB)
$Progress1 GUICtrlCreateProgress(05288149)
DirCreate("C:\\program files\frogiih's World")

$button_gesinnung GUICtrlCreateButton("Gesinnung"7361207525)
$button_fertigkeiten GUICtrlCreateButton("Fertigkeiten"736967525)
$button_option GUICtrlCreateButton("Optionen"736727525)
GUICtrlSetState($button_gesinnung$GUI_DISABLE)
GUICtrlSetState($button_option$GUI_DISABLE)
GUICtrlSetState($button_fertigkeiten$GUI_DISABLE)

$Group_action GUICtrlCreateGroup("Aktivität"8160540361)
$action GUICtrlCreatePic(""16184524329)
GUICtrlCreateGroup("", -99, -9911)

$Group_welt GUICtrlCreateGroup("Welt"88185145)
$pic_map GUICtrlCreatePic(""1632164108)
GUICtrlCreateGroup("", -99, -9911)


$pic_head GUICtrlCreatePic(""1928356132)
$Group_auswahl GUICtrlCreateGroup("Auswahl"552160265361)

$MenuItem_acc GUICtrlCreateMenu("Account")
$MenuItem_cre_acc GUICtrlCreateMenuItem("Create Account"$MenuItem_acc)
$MenuItem_login GUICtrlCreateMenuItem("Log In"$MenuItem_acc)
$MenuItem_help GUICtrlCreateMenu("Help")
$MenuItem_how GUICtrlCreateMenuItem("How To Play"$MenuItem_help)

$txt_name GUICtrlCreateLabel("Name:"560803517)
$txt_Rasse GUICtrlCreateLabel("Rasse:"5601003717)
$txt_geschlecht GUICtrlCreateLabel("Geschlecht"5601205817)

$input_name GUICtrlCreateInput("-"6248010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_rasse GUICtrlCreateInput("-"62410010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_geschlecht GUICtrlCreateInput("-"62412010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)

Controls #########################Login###################
$txt_login GUICtrlCreateLabel("Join the Game!"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$input_id GUICtrlCreateInput("ID"58424820921)
GUICtrlSetState(-1$GUI_HIDE)
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
GUICtrlSetState(-1$GUI_HIDE)
$button_join GUICtrlCreateButton("Join"5923527525)
GUICtrlSetState(-1$GUI_HIDE)
Controls ########################Login##################End

Controls ########################Cre_acc################
$cre_input_id GUICtrlCreateInput("ID"58423220921)
GUICtrlSetState(-1$GUI_HIDE)
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
GUICtrlSetState(-1$GUI_HIDE)
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
GUICtrlSetState(-1$GUI_HIDE)
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
GUICtrlSetState(-1$GUI_HIDE)
GUICtrlCreateGroup("", -99, -9911)
Controls #######################Cre_acc#################End



GUISetState(@SW_SHOW)


While 
1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$MenuItem_cre_acc
            $cre_input_id 
GUICtrlCreateInput("ID"58423220921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
GUICtrlCreateGroup("", -99, -9911)

            
GUICtrlSetState($txt_login  $GUI_HIDE)
            
GUICtrlSetState($input_id  $GUI_HIDE)
            
GUICtrlSetState($input_pw  $GUI_HIDE)
            
GUICtrlSetState($checkbox_save  $GUI_HIDE)
            
GUICtrlSetState($button_cancel2  $GUI_HIDE)
            
GUICtrlSetState($button_join  $GUI_HIDE)


        Case 
$MenuItem_login
            $txt_login 
GUICtrlCreateLabel("Join the Game!"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_id GUICtrlCreateInput("ID"58424820921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_join GUICtrlCreateButton("Join"5923527525)
            
GUICtrlSetState(-1$GUI_SHOW)

            
GUICtrlSetState($cre_input_id  $GUI_HIDE)
            
GUICtrlSetState($cre_input_pw  $GUI_HIDE)
            
GUICtrlSetState($txt_cre_acc  $GUI_HIDE)
            
GUICtrlSetState($button_cancel  $GUI_HIDE)
            
GUICtrlSetState($button_confirm  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_M  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_W  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse1  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse2  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse3  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse4  $GUI_HIDE)


        Case 
$button_join
            $pw2 
IniRead("C:\program files\Daten.ini""Daten""pw""")
            
$pw3 _StringEncrypt(0$pw2"lolator")
            If 
$input_pw $pw3 Then
                TrayTip
("frogiih's World""Einloggen Erfolgreich. Daten werden geladen..."10000)
            Else
                
TrayTip("frogiih's World""Achtung! Deine Angegebenen Daten stimmen nicht überein. Bitte überprüfe diese."10000)
            EndIf

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_confirm
            $id1 
_StringEncrypt(1$cre_input_id"lolator")
            
IniWrite("C:\program files\frogiih's World\Daten.ini""Daten""id"$id1)
            
$pw1 _StringEncrypt(1$cre_input_pw"lolator")
            
IniWrite("C:\program files\frogiih's World\Daten.ini""Daten""pw"$pw1)

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_gesinnung
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_fertigkeiten
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_option
            $Inhalt 
GUICtrlCreatePic(""560152252364)
    EndSwitch
WEnd 
Danke schoneinmal dafür! :)

Jetzt fehlt nur noch das mit den Daten...
01/28/2011 19:11 omer36#4
dein fehler lag darin, dass du die input vorher auslesen musst...:
aus:
PHP Code:
 _StringEncrypt(1$cre_input_id"lolator"
wird:

PHP Code:
 _StringEncrypt(1GUICtrlRead($cre_input_id), "lolator"

und auch hier:
PHP Code:
If GUICtrlRead($input_pw) = $pw3 Then 
dann klappts auch ;)


PHP Code:
#include <GUIConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <File.au3>
#include <Array.au3>

$Form1 GUICreate("frogiih's World"81855900)
GUISetBkColor(0xABABAB)
$Progress1 GUICtrlCreateProgress(05288149)


$button_gesinnung GUICtrlCreateButton("Gesinnung"7361207525)
$button_fertigkeiten GUICtrlCreateButton("Fertigkeiten"736967525)
$button_option GUICtrlCreateButton("Optionen"736727525)
GUICtrlSetState($button_gesinnung$GUI_DISABLE)
GUICtrlSetState($button_option$GUI_DISABLE)
GUICtrlSetState($button_fertigkeiten$GUI_DISABLE)

$Group_action GUICtrlCreateGroup("Aktivität"8160540361)
$action GUICtrlCreatePic(""16184524329)
GUICtrlCreateGroup("", -99, -9911)

$Group_welt GUICtrlCreateGroup("Welt"88185145)
$pic_map GUICtrlCreatePic(""1632164108)
GUICtrlCreateGroup("", -99, -9911)


$pic_head GUICtrlCreatePic(""1928356132)
$Group_auswahl GUICtrlCreateGroup("Auswahl"552160265361)

$MenuItem_acc GUICtrlCreateMenu("Account")
$MenuItem_cre_acc GUICtrlCreateMenuItem("Create Account"$MenuItem_acc)
$MenuItem_login GUICtrlCreateMenuItem("Log In"$MenuItem_acc)
$MenuItem_help GUICtrlCreateMenu("Help")
$MenuItem_how GUICtrlCreateMenuItem("How To Play"$MenuItem_help)

$txt_name GUICtrlCreateLabel("Name:"560803517)
$txt_Rasse GUICtrlCreateLabel("Rasse:"5601003717)
$txt_geschlecht GUICtrlCreateLabel("Geschlecht"5601205817)

$input_name GUICtrlCreateInput("-"6248010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_rasse GUICtrlCreateInput("-"62410010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_geschlecht GUICtrlCreateInput("-"62412010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)

Controls #########################Login###################
$txt_login GUICtrlCreateLabel("Join the Game!"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$input_id GUICtrlCreateInput("ID"58424820921)
GUICtrlSetState(-1$GUI_HIDE)
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
GUICtrlSetState(-1$GUI_HIDE)
$button_join GUICtrlCreateButton("Join"5923527525)
GUICtrlSetState(-1$GUI_HIDE)
Controls ########################Login##################End

Controls ########################Cre_acc################
$cre_input_id GUICtrlCreateInput("ID"58423220921)
GUICtrlSetState(-1$GUI_HIDE)
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
GUICtrlSetState(-1$GUI_HIDE)
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
GUICtrlSetState(-1$GUI_HIDE)
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
GUICtrlSetState(-1$GUI_HIDE)
GUICtrlCreateGroup("", -99, -9911)
Controls #######################Cre_acc#################End



GUISetState(@SW_SHOW)


While 
1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$MenuItem_cre_acc
            $cre_input_id 
GUICtrlCreateInput("ID"58423220921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
GUICtrlCreateGroup("", -99, -9911)

            
GUICtrlSetState($txt_login  $GUI_HIDE)
            
GUICtrlSetState($input_id  $GUI_HIDE)
            
GUICtrlSetState($input_pw  $GUI_HIDE)
            
GUICtrlSetState($checkbox_save  $GUI_HIDE)
            
GUICtrlSetState($button_cancel2  $GUI_HIDE)
            
GUICtrlSetState($button_join  $GUI_HIDE)


        Case 
$MenuItem_login
            $txt_login 
GUICtrlCreateLabel("Join the Game!"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_id GUICtrlCreateInput("ID"58424820921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_join GUICtrlCreateButton("Join"5923527525)
            
GUICtrlSetState(-1$GUI_SHOW)

            
GUICtrlSetState($cre_input_id  $GUI_HIDE)
            
GUICtrlSetState($cre_input_pw  $GUI_HIDE)
            
GUICtrlSetState($txt_cre_acc  $GUI_HIDE)
            
GUICtrlSetState($button_cancel  $GUI_HIDE)
            
GUICtrlSetState($button_confirm  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_M  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_W  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse1  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse2  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse3  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse4  $GUI_HIDE)


        Case 
$button_join
            $pw2 
IniRead(@ScriptDir "\Daten.ini""Daten""pw""")
            
$pw3 _StringEncrypt(0$pw2"lolator")
            If 
GUICtrlRead($input_pw) = $pw3 Then
                TrayTip
("frogiih's World""Einloggen Erfolgreich. Daten werden geladen..."10000)
            Else
                
TrayTip("frogiih's World""Achtung! Deine Angegebenen Daten stimmen nicht überein. Bitte überprüfe diese."10000)
            EndIf

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_confirm
            $id1 
_StringEncrypt(1GUICtrlRead($cre_input_id), "lolator")
            
IniWrite(@ScriptDir "\Daten.ini""Daten""id"$id1)
            
$pw1 _StringEncrypt(1GUICtrlRead($cre_input_pw), "lolator")
            
IniWrite(@ScriptDir "\Daten.ini""Daten""pw"$pw1)

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_gesinnung
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_fertigkeiten
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_option
            $Inhalt 
GUICtrlCreatePic(""560152252364)
    EndSwitch
WEnd 

ps musst den ini pfad wieder anpassen, habs zum testen geändert,, und oben war noch ein
DirCreate() ;)
01/28/2011 20:09 .Moskito#5
Quote:
Originally Posted by omer36 View Post
dein fehler lag darin, dass du die input vorher auslesen musst...:
aus:
PHP Code:
 _StringEncrypt(1$cre_input_id"lolator"
wird:

PHP Code:
 _StringEncrypt(1GUICtrlRead($cre_input_id), "lolator"

und auch hier:
PHP Code:
If GUICtrlRead($input_pw) = $pw3 Then 
dann klappts auch ;)


PHP Code:
#include <GUIConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <File.au3>
#include <Array.au3>

$Form1 GUICreate("frogiih's World"81855900)
GUISetBkColor(0xABABAB)
$Progress1 GUICtrlCreateProgress(05288149)


$button_gesinnung GUICtrlCreateButton("Gesinnung"7361207525)
$button_fertigkeiten GUICtrlCreateButton("Fertigkeiten"736967525)
$button_option GUICtrlCreateButton("Optionen"736727525)
GUICtrlSetState($button_gesinnung$GUI_DISABLE)
GUICtrlSetState($button_option$GUI_DISABLE)
GUICtrlSetState($button_fertigkeiten$GUI_DISABLE)

$Group_action GUICtrlCreateGroup("Aktivität"8160540361)
$action GUICtrlCreatePic(""16184524329)
GUICtrlCreateGroup("", -99, -9911)

$Group_welt GUICtrlCreateGroup("Welt"88185145)
$pic_map GUICtrlCreatePic(""1632164108)
GUICtrlCreateGroup("", -99, -9911)


$pic_head GUICtrlCreatePic(""1928356132)
$Group_auswahl GUICtrlCreateGroup("Auswahl"552160265361)

$MenuItem_acc GUICtrlCreateMenu("Account")
$MenuItem_cre_acc GUICtrlCreateMenuItem("Create Account"$MenuItem_acc)
$MenuItem_login GUICtrlCreateMenuItem("Log In"$MenuItem_acc)
$MenuItem_help GUICtrlCreateMenu("Help")
$MenuItem_how GUICtrlCreateMenuItem("How To Play"$MenuItem_help)

$txt_name GUICtrlCreateLabel("Name:"560803517)
$txt_Rasse GUICtrlCreateLabel("Rasse:"5601003717)
$txt_geschlecht GUICtrlCreateLabel("Geschlecht"5601205817)

$input_name GUICtrlCreateInput("-"6248010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_rasse GUICtrlCreateInput("-"62410010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)
$input_geschlecht GUICtrlCreateInput("-"62412010521BitOR($ES_CENTER$ES_AUTOHSCROLL$ES_READONLY), 0)
GUICtrlSetBkColor(-10x696969)

Controls #########################Login###################
$txt_login GUICtrlCreateLabel("Join the Game!"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$input_id GUICtrlCreateInput("ID"58424820921)
GUICtrlSetState(-1$GUI_HIDE)
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
GUICtrlSetState(-1$GUI_HIDE)
$button_join GUICtrlCreateButton("Join"5923527525)
GUICtrlSetState(-1$GUI_HIDE)
Controls ########################Login##################End

Controls ########################Cre_acc################
$cre_input_id GUICtrlCreateInput("ID"58423220921)
GUICtrlSetState(-1$GUI_HIDE)
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
GUICtrlSetState(-1$GUI_HIDE)
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
GUICtrlSetFont(-1144000"MS Sans Serif")
GUICtrlSetState(-1$GUI_HIDE)
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
GUICtrlSetState(-1$GUI_HIDE)
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
GUICtrlSetState(-1$GUI_HIDE)
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
GUICtrlSetState(-1$GUI_HIDE)
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
GUICtrlSetState(-1$GUI_HIDE)
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
GUICtrlSetState(-1$GUI_HIDE)
GUICtrlCreateGroup("", -99, -9911)
Controls #######################Cre_acc#################End



GUISetState(@SW_SHOW)


While 
1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$MenuItem_cre_acc
            $cre_input_id 
GUICtrlCreateInput("ID"58423220921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$cre_input_pw GUICtrlCreateInput("Passwort"58426420921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$txt_cre_acc GUICtrlCreateLabel("Create Account"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel GUICtrlCreateButton("Cancel"7124647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_confirm GUICtrlCreateButton("Confirm"5924647525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_M GUICtrlCreateRadio("Männlich"58429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$geschlecht_W GUICtrlCreateRadio("Weiblich"70429011317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$Group2 GUICtrlCreateGroup("Rasse"584312209129)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse1 GUICtrlCreateRadio("Rasse1"60033511317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse2 GUICtrlCreateRadio("Rasse2"60035911317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse3 GUICtrlCreateRadio("Rasse3"60038311317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$radio_rasse4 GUICtrlCreateRadio("Rasse4"60040711317)
            
GUICtrlSetState(-1$GUI_SHOW)
            
GUICtrlCreateGroup("", -99, -9911)

            
GUICtrlSetState($txt_login  $GUI_HIDE)
            
GUICtrlSetState($input_id  $GUI_HIDE)
            
GUICtrlSetState($input_pw  $GUI_HIDE)
            
GUICtrlSetState($checkbox_save  $GUI_HIDE)
            
GUICtrlSetState($button_cancel2  $GUI_HIDE)
            
GUICtrlSetState($button_join  $GUI_HIDE)


        Case 
$MenuItem_login
            $txt_login 
GUICtrlCreateLabel("Join the Game!"61619213928)
            
GUICtrlSetFont(-1144000"MS Sans Serif")
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_id GUICtrlCreateInput("ID"58424820921)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$input_pw GUICtrlCreateInput("Passwort"58428020921$ES_PASSWORD)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$checkbox_save GUICtrlCreateCheckbox("Save ID and Passwort"66431213717)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_cancel2 GUICtrlCreateButton("Cancel"7123527525)
            
GUICtrlSetState(-1$GUI_SHOW)
            
$button_join GUICtrlCreateButton("Join"5923527525)
            
GUICtrlSetState(-1$GUI_SHOW)

            
GUICtrlSetState($cre_input_id  $GUI_HIDE)
            
GUICtrlSetState($cre_input_pw  $GUI_HIDE)
            
GUICtrlSetState($txt_cre_acc  $GUI_HIDE)
            
GUICtrlSetState($button_cancel  $GUI_HIDE)
            
GUICtrlSetState($button_confirm  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_M  $GUI_HIDE)
            
GUICtrlSetState($geschlecht_W  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse1  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse2  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse3  $GUI_HIDE)
            
GUICtrlSetState($radio_rasse4  $GUI_HIDE)


        Case 
$button_join
            $pw2 
IniRead(@ScriptDir "\Daten.ini""Daten""pw""")
            
$pw3 _StringEncrypt(0$pw2"lolator")
            If 
GUICtrlRead($input_pw) = $pw3 Then
                TrayTip
("frogiih's World""Einloggen Erfolgreich. Daten werden geladen..."10000)
            Else
                
TrayTip("frogiih's World""Achtung! Deine Angegebenen Daten stimmen nicht überein. Bitte überprüfe diese."10000)
            EndIf

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_confirm
            $id1 
_StringEncrypt(1GUICtrlRead($cre_input_id), "lolator")
            
IniWrite(@ScriptDir "\Daten.ini""Daten""id"$id1)
            
$pw1 _StringEncrypt(1GUICtrlRead($cre_input_pw), "lolator")
            
IniWrite(@ScriptDir "\Daten.ini""Daten""pw"$pw1)

            
GUICtrlSetState($button_gesinnung$GUI_ENABLE)
            
GUICtrlSetState($button_option$GUI_ENABLE)
            
GUICtrlSetState($button_fertigkeiten$GUI_ENABLE)
        Case 
$button_gesinnung
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_fertigkeiten
            $Inhalt 
GUICtrlCreatePic(""560152252364)
        Case 
$button_option
            $Inhalt 
GUICtrlCreatePic(""560152252364)
    EndSwitch
WEnd 

ps musst den ini pfad wieder anpassen, habs zum testen geändert,, und oben war noch ein
DirCreate() ;)

Super!
Danke für deine Hilfe, hat alles geklappt. ;)