Hallo,
ich hab ein Programm geschrieben, dass wenn jemand auf das Button klickt noch ein Fenster sich öffnet. Dann sind zwei "Guis" offen, aber wenn ich jetzt das Zweite Schließe schließt sich auch das 1. Und wenn ich das 2. nicht schließe reagiert das 1. nicht mehr:
Wie behebe ich das?
Spoiler anzeigen
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\Documents\Downloads\spring-desktop-icons-by-softicons.com\ico\monitor.ico
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
MsgBox(0,"Starten!","Test wird gestartet!",1)
DirCreate(@ScriptDir & "/client")
IniWrite(@ScriptDIr & "/einstellungen.dll", "Info", "Version", "1.0.0.0")
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Test", 305, 199, 481, 357)
GUISetBkColor(0x008080)
$erstellen = GUICtrlCreateButton("Test1", 8, 88, 137, 49, $WS_GROUP)
$speichern = GUICtrlCreateButton("Test2", 8, 144, 137, 49, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Test by Me", 40, 24, 224, 33)
GUICtrlSetFont(-1, 22, 400, 0, "@Dotum")
GUICtrlSetColor(-1,0x000000)
$offnen = GUICtrlCreateButton("Liste öffnen", 152, 88, 137, 49, $WS_GROUP)
$update = GUICtrlCreateButton("Update", 152, 144, 137, 49, $WS_GROUP)
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
$namep = "den Test"
$msgbox = Msgbox(36,"Beenden?","Wollen sie " & $namep & " wirklich beenden? Alle bis jetzt nicht gespeicherten Daten gehen verloren!")
If $msgbox = 6 Then
exit
EndIf
Case $erstellen
Msgbox(0,"Test","Hi")
Case $speichern
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Speichern ", 443, 60, 590, 550)
GUISetBkColor(0x008080)
$Label1 = GUICtrlCreateLabel("Zweck:", 8, 16, 83, 32)
GUICtrlSetFont(-1, 15, 400, 0, "Arial Black")
$passwort = GUICtrlCreateInput("", 96, 16, 209, 28)
GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Speichern", 312, 8, 129, 41, $WS_GROUP)
GUICtrlSetFont(-1, 14, 400, 0, "Modern")
GUISetState(@SW_Show)
While 2
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
exit
Case $Button1
[/autoit] [autoit][/autoit] [autoit]EndSwitch
WEnd
MFG