Hallo zusammen,
ich automatisiere zur Zeit eine Windows Installationsroutine und es gibt viele kleine Zwischenschritte bei der Konfiguration von Windows & 3rd party Installationen. Diese ganzen Schritte habe ich jetzt in jeweils eigenen Funktionen programmiert, z.B.
_disableUAC()
_installWinSCP()
...
Bis jetzt habe ich alles gerade benötigte ausgeklammert. Jetzt möchte ich dafür eine GUI erstellen und habe mit Koda mir schon ein wenig das Layout erstellt:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### ...\Form2.kxf
$Form2 = GUICreate("About", 707, 545, 271, 238)
GUISetIcon("D:\006.ico")
$GroupBox1 = GUICtrlCreateGroup("", 40, 24, 609, 121)
$Image1 = GUICtrlCreatePic("", 48, 40, 105, 97, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("MIPS AutoInstaller 0.9", 192, 48, 109, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Install", 288, 440, 75, 25)
$Group1 = GUICtrlCreateGroup("", 48, 168, 257, 217)
$Checkbox6 = GUICtrlCreateCheckbox("Use small taskbar icons", 64, 208, 169, 17)
$Checkbox7 = GUICtrlCreateCheckbox("set system icon clock off", 64, 256, 169, 17)
$Checkbox8 = GUICtrlCreateCheckbox("set system icon net on", 64, 280, 169, 17)
$Checkbox9 = GUICtrlCreateCheckbox("add CMD to context", 64, 232, 169, 17)
$Checkbox10 = GUICtrlCreateCheckbox("deactivate UAC", 64, 184, 169, 17)
GUICtrlSetTip(-1, "test hint")
$Checkbox16 = GUICtrlCreateCheckbox("set system icon notification center off", 64, 328, 233, 17)
$Checkbox17 = GUICtrlCreateCheckbox("set system icon power on", 64, 304, 169, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Alles anzeigen
Ich stehe jetzt allerdings auf dem Schlauch: Ich möchte dass die GUI je nach gewählten checkboxen eine Reihe jeweiliger Funktionen nach drücken auf Install ausführt. Wie mache ich das am besten? Eine String variable erstellen, alle Funktionsnamen als string anhängen, String variable als main-Funktion ausführen? Oder doch irgendwie ein Array von Funktionsnamen erstellen und dann mit einer main Funktion abarbeiten??
Da fehlt mir wohl irgendwie gerade ein wenig Kreativität Ich wünsche erstmal ein schönes Wochenende!
Gruß