Hallo Community.
Gibt es einen Befehl, der von der neu geöffneten GUI zur alten durch einen Button wechseln kann?
Weil Case $Button1 und dann den GUI Code einfügen, ist mir zu lang...
Hier mein Script:
Spoiler anzeigen
#include < GUIConstants.au3 >
#include < EditConstants.au3 >
#Region ### START Koda GUI section ### Form=C:\Users\Alex\Desktop\GUI Login.kxf
$Form2 = GUICreate("Login", 338, 72, 330, 172)
$Input1 = GUICtrlCreateInput("", 32, 8, 161, 21)
$Input2 = GUICtrlCreateInput("123456789", 32, 32, 161, 21, $ES_PASSWORD)
$Label1 = GUICtrlCreateLabel("ID", 8, 8, 21, 19)
GUICtrlSetFont(-1, 11, 400, 0, "@Meiryo")
$Label2 = GUICtrlCreateLabel("PW", 8, 32, 25, 24)
GUICtrlSetFont(-1, 10, 400, 0, "@Meiryo")
$Button1 = GUICtrlCreateButton("LOGIN", 200, 8, 129, 49, 0)
GUICtrlSetFont(-1, 20, 400, 0, "ArtBrush")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button1
If GUIctrlread ($Input1) = "Alex" and GUICtrlRead ($input2) = "korax" Then
GUIDelete ()
#include < GUIConstants.au3 >
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 445, 193, 125)
$Button1 = GUICtrlCreateButton("ZURÜCK", 88, 48, 489, 353, 0)
GUICtrlSetFont(-1, 24, 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
EndSwitch
WEnd
Else
MsgBox (0,"Es ist ein Fehler aufgetreten.","Die Daten waren inkorrekt." & @CRLF & "Bitte versuche es erneut!")
EndIf
EndSwitch
WEnd
[/autoit]