nochmal gendert:
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!", "Passwort Maker wird gestartet!", 1)
DirCreate(@ScriptDir & "/Passwörter")
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>
Global $erstellt = "Test " ;<==============================
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ### Form=
$form1 = GUICreate("Passwort Maker by TheFreakBpx3", 305, 199, 481, 357)
GUISetBkColor(0x008080)
$erstellen = GUICtrlCreateButton("Passwort erstellen", 8, 88, 137, 49, $WS_GROUP)
$speichern = GUICtrlCreateButton("Passwort speichern", 8, 144, 137, 49, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Passwort Maker", 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)
#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, $form1)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
$msg = GUIGetMsg(1)
Switch $msg[1]
Case $form1
Switch $msg[0] ;<===========================
Case $GUI_EVENT_CLOSE
$namep = "Passwort Maker"
$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
$erstellt = Chr(Random(97, 122)) & Chr(Random(65, 90)) & Chr(Random(65, 90)) & Chr(Random(65, 90)) & Chr(Random(65, 90)) & Chr(Random(65, 90))
MsgBox(64, "Passwort!", "Erstelltes PW: " & $erstellt)
Case $speichern ;<===============================
GUISetState(@SW_DISABLE, $form1)
GUISetState(@SW_SHOW, $form2)
Case $offnen ;<=============================== verschoben ab hier
ShellExecute(@ScriptDir & "/passwörter/passwort.ini")
Case $update
FileDelete(@TempDir & "\update.txt")
InetGet("http://www.quizthefreakbpx3.co.de/Pw/update.txt", @TempDir & "\update.txt", 1, 0)
$updatetxt = FileOpen(@TempDir & "\update.txt", 0)
$ver_server = FileReadLine($updatetxt, 1)
$ver_pc = IniRead("einstellungen.dll", "Info", "Version", "")
If $ver_server = $ver_pc Or $ver_server = "" Then
FileClose($updatetxt)
MsgBox(0, "Keine neue Version", "Es gibt kein Update!")
Else
$msgbox = MsgBox(36, "Update!", "Es ist ein neues Update verfügbar! Downloaden?")
If $msgbox = 6 Then
ToolTip("Update wird runtergeladen... bitte warten....")
DirCreate(@ScriptDir & "\neue version")
InetGet("http://www.quizthefreakbpx3.co.de/pw/PasswortMaker.exe", @ScriptDir & "\neue version\PasswortMaker.exe", 1, 0)
IniWrite("einstellungen.dll", "Info", "Version", $ver_server)
FileClose($updatetxt)
FileDelete(@ScriptDir & "update.txt")
ToolTip("")
MsgBox(0, "Update", "Das Programm wurde heruntergeladen! Danke fürs downloaden!")
EndIf
EndIf ;<=============================== bis hier war der falschen Form zugeordnet
EndSwitch
Case $form2
Switch $msg[0]
Case $GUI_EVENT_CLOSE
GUISetState(@SW_ENABLE, $form1) ;==================================
GUISetState(@SW_HIDE, $form2) ;==================================
Case $Button1
$box = MsgBox(36, "Speichern?", "Wollen sie das Passwort " & $erstellt & " für den Zweck " & GUICtrlRead($passwort) & " speichern?")
If $box = 6 Then
IniWrite(@ScriptDir & "/passwörter/passwort.ini", GUICtrlRead($passwort), "Passwort", $erstellt)
EndIf
;evtl. hier ach beenden
GUISetState(@SW_ENABLE, $form1) ;==================================
GUISetState(@SW_HIDE, $form2) ;==================================
EndSwitch
EndSwitch
WEnd
mfg autoBert