Koda-Form Hilfe benötigt

  • Also,

    ersteinmal guten tag zusammen :) !

    Ich arbeite jetzt seit ca. 2 Wochen mit AutoIT und habe eine Automatische Installation von mehreren Programmen fertiggestellt !

    Mein Design hab ich mit Koda erstellt, jedoch 2 Formen.
    Wie kann ich das script umstellen, das wenn ich ein Button drücke der Inhalt des Hauptfensters sich ändert zum nächsten Inhalt ?

    Hier Form 1, das Hauptfenster:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=s:\betriebssysteme\auto install software\design\form1.kxf
    $Form1_1 = GUICreate("Auto Install", 571, 405, 355, 285)
    $Button1 = GUICtrlCreateButton("32 Bit System", 72, 136, 139, 33)
    $Button2 = GUICtrlCreateButton("64 Bit System", 72, 192, 139, 33)
    $Button3 = GUICtrlCreateButton("Notebook", 72, 248, 139, 33)
    $Button4 = GUICtrlCreateButton("Manuell", 72, 304, 139, 33)
    $Label1 = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 92)
    $Button5 = GUICtrlCreateButton("Software auslesen", 336, 248, 139, 33)
    $Label2 = GUICtrlCreateLabel(" Extras ", 352, 136, 105, 33)
    GUICtrlSetFont(-1, 18, 800, 4, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button6 = GUICtrlCreateButton("Systeminformationen", 336, 192, 139, 33)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 32bit.exe")
    Case $Button2
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 64bit.exe")
    Case $Button3
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notebooks.exe")
    Case $Button4 ; Manuelle installation
    Case $Button5 ; Software auslesen
    Case $Button6 ; Systeminfo auslesen
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Systeminfo.exe")
    Case $Logo
    EndSwitch
    WEnd

    [/autoit]

    und hier Form 2, die beim drücken von Button 4 in das Hauptfenster soll:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=S:\Betriebssysteme\Auto Install Software\Design\form2.kxf
    $Form1_1 = GUICreate("Auto Install Manuell", 571, 405, 209, 161)
    $Label1 = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 100)
    $Checkbox1 = GUICtrlCreateCheckbox(" 7-Zip", 48, 144, 121, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox2 = GUICtrlCreateCheckbox("Acrobat Reader", 48, 184, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox3 = GUICtrlCreateCheckbox("Flash Player", 48, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox4 = GUICtrlCreateCheckbox("Cisco VPN Client", 48, 264, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox5 = GUICtrlCreateCheckbox("Ferrari Fax", 48, 304, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox6 = GUICtrlCreateCheckbox("Free PDF", 216, 144, 137, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox7 = GUICtrlCreateCheckbox("iTunes", 216, 184, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox8 = GUICtrlCreateCheckbox("Java", 216, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox9 = GUICtrlCreateCheckbox("ESET NOD32", 216, 264, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox10 = GUICtrlCreateCheckbox("Notepad++", 216, 304, 113, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox11 = GUICtrlCreateCheckbox("WSUS Client", 384, 144, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox12 = GUICtrlCreateCheckbox("Ashampo 6 ", 384, 184, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox13 = GUICtrlCreateCheckbox("Office 2010", 384, 224, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox14 = GUICtrlCreateCheckbox("JMS", 384, 264, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox15 = GUICtrlCreateCheckbox("OMS", 384, 304, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button1 = GUICtrlCreateButton("Installieren", 48, 344, 163, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("iTunes x64", 216, 200, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox17 = GUICtrlCreateCheckbox("Java x64", 216, 240, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox18 = GUICtrlCreateCheckbox("ESET NOD32 x64", 216, 280, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox19 = GUICtrlCreateCheckbox("Cisco VPN Clientx64", 48, 280, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox20 = GUICtrlCreateCheckbox("Flash Player x64", 48, 240, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox21 = GUICtrlCreateCheckbox(" 7-Zip x64", 48, 160, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    If GUICtrlRead($checkbox1) = 1 Then
    $Checkbox1 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip.exe")
    EndIf
    If GUICtrlRead($checkbox2) = 1 Then
    $Checkbox2 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Acrobat Reader.exe")
    EndIf
    If GUICtrlRead($checkbox3) = 1 Then
    $Checkbox3 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player.exe")
    EndIf
    If GUICtrlRead($checkbox4) = 1 Then
    $Checkbox4 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client.exe")
    EndIf
    If GUICtrlRead($checkbox5) = 1 Then
    $Checkbox5 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ferrari Fax.exe")
    EndIf
    If GUICtrlRead($checkbox6) = 1 Then
    $Checkbox6 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\FreePDF.exe")
    EndIf
    If GUICtrlRead($checkbox7) = 1 Then
    $Checkbox7 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes.exe")
    EndIf
    If GUICtrlRead($checkbox8) = 1 Then
    $Checkbox8 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Java.exe")
    EndIf
    If GUICtrlRead($checkbox9) = 1 Then
    $Checkbox9 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32.exe")
    EndIf
    If GUICtrlRead($Checkbox10) = 1 Then
    $Checkbox10 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notepad.exe")
    EndIf
    If GUICtrlRead($checkbox11) = 1 Then
    $Checkbox11 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\WSUS.exe")
    EndIf
    If GUICtrlRead($checkbox12) = 1 Then
    $Checkbox12 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ashampoo.exe")
    EndIf
    If GUICtrlRead($checkbox13) = 1 Then
    $Checkbox13 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Office 2010.exe")
    EndIf
    ; JMS
    If GUICtrlRead($checkbox14) = 1 Then
    $Checkbox14 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    ; OMS
    If GUICtrlRead($checkbox15) = 1 Then
    $Checkbox15 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    If GUICtrlRead($checkbox16) = 1 Then
    $Checkbox16 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes64.exe")
    EndIf
    If GUICtrlRead($checkbox17) = 1 Then
    $Checkbox17 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\java64.exe")
    EndIf
    If GUICtrlRead($checkbox18) = 1 Then
    $Checkbox18 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32 64.exe")
    EndIf
    If GUICtrlRead($checkbox19) = 1 Then
    $Checkbox19 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client64.exe")
    EndIf
    If GUICtrlRead($Checkbox20) = 1 Then
    $Checkbox20 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player 64.exe")
    EndIf
    If GUICtrlRead($Checkbox21) = 1 Then
    $Checkbox21 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip64.exe")
    EndIf
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Danke schonmal im vorraus !

    Einmal editiert, zuletzt von Manny001 (9. September 2011 um 15:04)

  • HIer,

    aber solltest dir gleich angewöhnen die Variablen sinnvoll zu benennen:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #region ### START Koda GUI section ### Form=s:\betriebssysteme\auto install software\design\form1.kxf
    $Form = GUICreate("Auto Install", 571, 405)
    $Button1 = GUICtrlCreateButton("32 Bit System", 72, 136, 139, 33)
    $Button2 = GUICtrlCreateButton("64 Bit System", 72, 192, 139, 33)
    $Button3 = GUICtrlCreateButton("Notebook", 72, 248, 139, 33)
    $Button4 = GUICtrlCreateButton("Manuell", 72, 304, 139, 33)
    $Label = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 92)
    $Button5 = GUICtrlCreateButton("Software auslesen", 336, 248, 139, 33)
    $Label2 = GUICtrlCreateLabel(" Extras ", 352, 136, 105, 33)
    GUICtrlSetFont(-1, 18, 800, 4, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button6 = GUICtrlCreateButton("Systeminformationen", 336, 192, 139, 33)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #region ### START Koda GUI section ### Form=S:\Betriebssysteme\Auto Install Software\Design\form2.kxf
    $Form1_1 = GUICreate("Auto Install Manuell", 571, 405)
    $Label1 = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 100)
    $Checkbox1 = GUICtrlCreateCheckbox(" 7-Zip", 48, 144, 121, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox2 = GUICtrlCreateCheckbox("Acrobat Reader", 48, 184, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox3 = GUICtrlCreateCheckbox("Flash Player", 48, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox4 = GUICtrlCreateCheckbox("Cisco VPN Client", 48, 264, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox5 = GUICtrlCreateCheckbox("Ferrari Fax", 48, 304, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox6 = GUICtrlCreateCheckbox("Free PDF", 216, 144, 137, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox7 = GUICtrlCreateCheckbox("iTunes", 216, 184, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox8 = GUICtrlCreateCheckbox("Java", 216, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox9 = GUICtrlCreateCheckbox("ESET NOD32", 216, 264, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox10 = GUICtrlCreateCheckbox("Notepad++", 216, 304, 113, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox11 = GUICtrlCreateCheckbox("WSUS Client", 384, 144, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox12 = GUICtrlCreateCheckbox("Ashampo 6 ", 384, 184, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox13 = GUICtrlCreateCheckbox("Office 2010", 384, 224, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox14 = GUICtrlCreateCheckbox("JMS", 384, 264, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox15 = GUICtrlCreateCheckbox("OMS", 384, 304, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button5 = GUICtrlCreateButton("Installieren", 48, 344, 163, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("iTunes x64", 216, 200, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox17 = GUICtrlCreateCheckbox("Java x64", 216, 240, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox18 = GUICtrlCreateCheckbox("ESET NOD32 x64", 216, 280, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox19 = GUICtrlCreateCheckbox("Cisco VPN Clientx64", 48, 280, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox20 = GUICtrlCreateCheckbox("Flash Player x64", 48, 240, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox21 = GUICtrlCreateCheckbox(" 7-Zip x64", 48, 160, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_HIDE)
    #endregion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 32bit.exe")
    Case $Button2
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 64bit.exe")
    Case $Button3
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notebooks.exe")
    Case $Button4 ; Manuelle installation
    GUISetState(@SW_HIDE, $Form)
    GUISetState(@SW_SHOW, $Form1_1)
    Case $Button5 ; Software auslesen
    Case $Button6 ; Systeminfo auslesen
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Systeminfo.exe")
    Case $Logo
    Case $Button5
    If GUICtrlRead($Checkbox1) = 1 Then
    $Checkbox1 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip.exe")
    EndIf
    If GUICtrlRead($Checkbox2) = 1 Then
    $Checkbox2 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Acrobat Reader.exe")
    EndIf
    If GUICtrlRead($Checkbox3) = 1 Then
    $Checkbox3 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player.exe")
    EndIf
    If GUICtrlRead($Checkbox4) = 1 Then
    $Checkbox4 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client.exe")
    EndIf
    If GUICtrlRead($Checkbox5) = 1 Then
    $Checkbox5 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ferrari Fax.exe")
    EndIf
    If GUICtrlRead($Checkbox6) = 1 Then
    $Checkbox6 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\FreePDF.exe")
    EndIf
    If GUICtrlRead($Checkbox7) = 1 Then
    $Checkbox7 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes.exe")
    EndIf
    If GUICtrlRead($Checkbox8) = 1 Then
    $Checkbox8 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Java.exe")
    EndIf
    If GUICtrlRead($Checkbox9) = 1 Then
    $Checkbox9 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32.exe")
    EndIf
    If GUICtrlRead($Checkbox10) = 1 Then
    $Checkbox10 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notepad.exe")
    EndIf
    If GUICtrlRead($Checkbox11) = 1 Then
    $Checkbox11 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\WSUS.exe")
    EndIf
    If GUICtrlRead($Checkbox12) = 1 Then
    $Checkbox12 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ashampoo.exe")
    EndIf
    If GUICtrlRead($Checkbox13) = 1 Then
    $Checkbox13 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Office 2010.exe")
    EndIf
    ; JMS
    If GUICtrlRead($Checkbox14) = 1 Then
    $Checkbox14 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    ; OMS
    If GUICtrlRead($Checkbox15) = 1 Then
    $Checkbox15 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    If GUICtrlRead($Checkbox16) = 1 Then
    $Checkbox16 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes64.exe")
    EndIf
    If GUICtrlRead($Checkbox17) = 1 Then
    $Checkbox17 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\java64.exe")
    EndIf
    If GUICtrlRead($Checkbox18) = 1 Then
    $Checkbox18 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32 64.exe")
    EndIf
    If GUICtrlRead($Checkbox19) = 1 Then
    $Checkbox19 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client64.exe")
    EndIf
    If GUICtrlRead($Checkbox20) = 1 Then
    $Checkbox20 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player 64.exe")
    EndIf
    If GUICtrlRead($Checkbox21) = 1 Then
    $Checkbox21 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip64.exe")
    EndIf
    EndSwitch
    WEnd

    [/autoit]

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • Tach

    Also entweder machst du es so:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=s:\betriebssysteme\auto install software\design\form1.kxf
    $Form1_1 = GUICreate("Auto Install", 571, 405, 355, 285)
    $Button1 = GUICtrlCreateButton("32 Bit System", 72, 136, 139, 33)
    $Button2 = GUICtrlCreateButton("64 Bit System", 72, 192, 139, 33)
    $Button3 = GUICtrlCreateButton("Notebook", 72, 248, 139, 33)
    $Button4 = GUICtrlCreateButton("Manuell", 72, 304, 139, 33)
    $Label1 = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 92)
    $Button5 = GUICtrlCreateButton("Software auslesen", 336, 248, 139, 33)
    $Label2 = GUICtrlCreateLabel(" Extras ", 352, 136, 105, 33)
    GUICtrlSetFont(-1, 18, 800, 4, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button6 = GUICtrlCreateButton("Systeminformationen", 336, 192, 139, 33)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 32bit.exe")
    Case $Button2
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 64bit.exe")
    Case $Button3
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notebooks.exe")
    Case $Button4 ; Manuelle installation
    $Form1_2 = GUICreate("Auto Install Manuell", 571, 405, 355, 285)
    $Label1 = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 100)
    $Checkbox1 = GUICtrlCreateCheckbox(" 7-Zip", 48, 144, 121, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox2 = GUICtrlCreateCheckbox("Acrobat Reader", 48, 184, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox3 = GUICtrlCreateCheckbox("Flash Player", 48, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox4 = GUICtrlCreateCheckbox("Cisco VPN Client", 48, 264, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox5 = GUICtrlCreateCheckbox("Ferrari Fax", 48, 304, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox6 = GUICtrlCreateCheckbox("Free PDF", 216, 144, 137, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox7 = GUICtrlCreateCheckbox("iTunes", 216, 184, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox8 = GUICtrlCreateCheckbox("Java", 216, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox9 = GUICtrlCreateCheckbox("ESET NOD32", 216, 264, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox10 = GUICtrlCreateCheckbox("Notepad++", 216, 304, 113, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox11 = GUICtrlCreateCheckbox("WSUS Client", 384, 144, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox12 = GUICtrlCreateCheckbox("Ashampo 6 ", 384, 184, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox13 = GUICtrlCreateCheckbox("Office 2010", 384, 224, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox14 = GUICtrlCreateCheckbox("JMS", 384, 264, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox15 = GUICtrlCreateCheckbox("OMS", 384, 304, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button1 = GUICtrlCreateButton("Installieren", 48, 344, 163, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("iTunes x64", 216, 200, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox17 = GUICtrlCreateCheckbox("Java x64", 216, 240, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox18 = GUICtrlCreateCheckbox("ESET NOD32 x64", 216, 280, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox19 = GUICtrlCreateCheckbox("Cisco VPN Clientx64", 48, 280, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox20 = GUICtrlCreateCheckbox("Flash Player x64", 48, 240, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox21 = GUICtrlCreateCheckbox(" 7-Zip x64", 48, 160, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    GUIDelete($Form1_1)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    If GUICtrlRead($checkbox1) = 1 Then
    $Checkbox1 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip.exe")
    EndIf
    If GUICtrlRead($checkbox2) = 1 Then
    $Checkbox2 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Acrobat Reader.exe")
    EndIf
    If GUICtrlRead($checkbox3) = 1 Then
    $Checkbox3 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player.exe")
    EndIf
    If GUICtrlRead($checkbox4) = 1 Then
    $Checkbox4 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client.exe")
    EndIf
    If GUICtrlRead($checkbox5) = 1 Then
    $Checkbox5 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ferrari Fax.exe")
    EndIf
    If GUICtrlRead($checkbox6) = 1 Then
    $Checkbox6 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\FreePDF.exe")
    EndIf
    If GUICtrlRead($checkbox7) = 1 Then
    $Checkbox7 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes.exe")
    EndIf
    If GUICtrlRead($checkbox8) = 1 Then
    $Checkbox8 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Java.exe")
    EndIf
    If GUICtrlRead($checkbox9) = 1 Then
    $Checkbox9 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32.exe")
    EndIf
    If GUICtrlRead($Checkbox10) = 1 Then
    $Checkbox10 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notepad.exe")
    EndIf
    If GUICtrlRead($checkbox11) = 1 Then
    $Checkbox11 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\WSUS.exe")
    EndIf
    If GUICtrlRead($checkbox12) = 1 Then
    $Checkbox12 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ashampoo.exe")
    EndIf
    If GUICtrlRead($checkbox13) = 1 Then
    $Checkbox13 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Office 2010.exe")
    EndIf
    ; JMS
    If GUICtrlRead($checkbox14) = 1 Then
    $Checkbox14 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    ; OMS
    If GUICtrlRead($checkbox15) = 1 Then
    $Checkbox15 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    If GUICtrlRead($checkbox16) = 1 Then
    $Checkbox16 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes64.exe")
    EndIf
    If GUICtrlRead($checkbox17) = 1 Then
    $Checkbox17 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\java64.exe")
    EndIf
    If GUICtrlRead($checkbox18) = 1 Then
    $Checkbox18 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32 64.exe")
    EndIf
    If GUICtrlRead($checkbox19) = 1 Then
    $Checkbox19 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client64.exe")
    EndIf
    If GUICtrlRead($Checkbox20) = 1 Then
    $Checkbox20 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player 64.exe")
    EndIf
    If GUICtrlRead($Checkbox21) = 1 Then
    $Checkbox21 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip64.exe")
    EndIf
    Exit
    EndSwitch
    WEnd
    Case $Button5 ; Software auslesen
    Case $Button6 ; Systeminfo auslesen
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Systeminfo.exe")
    Case $Logo
    EndSwitch
    WEnd

    [/autoit]

    damit wird die neue GUI geöfnet und die alte geschlossen...eine andere möglichkeit wäre du entfernst zuerst die alten controls aus der GUI (mir fällt der befehl gerade nicht ein) und erstellst danach die neuen.

    Hoffe konnte helfen.

    Edit: Whops...da ist zwei mal die gleiche Lösung rausgekommen ^^

    Bild1: Ich beim debuggen

  • @ Chip

    vielen Dank .... das ist genau was ich wollte ! :)

    EDIT:

    dann wäre da nochwas .... wenn ich nach einem Button ein script ausführen möchte, was muss ich da beachten ?

    z.B. :

    Spoiler anzeigen
    [autoit]

    Case $Button5 ; Software auslesen
    $sBaseKey = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\"
    $iKey = 1
    $sSoftwareName = ""
    $sLogfile = "S:\Betriebssysteme\Auto Install Software\software.txt"
    $hFile = FileOpen ( $sLogfile, 10 )
    if @error Then
    MsgBox ( 64, "Error", "Could not open File")
    Exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    while 1
    $sKey = RegEnumKey ( $sBaseKey , $iKey )
    if @error then ExitLoop
    $sDisplayName = RegRead ( $sBaseKey & "\" & $sKey , "DisplayName")
    if @error Then
    $sDisplayName = RegRead ( $sBaseKey & "\" & $sKey , "QuietDisplayName")
    if @error then
    $iKey += 1
    ContinueLoop
    EndIf
    EndIf
    FileWriteLine ( $hFile, $sDisplayName & @crlf)
    $iKey += 1
    WEnd
    Sleep(1000)
    ShellExecute("S:\Betriebssysteme\Auto Install Software\software.txt")
    Sleep(2000)
    WinWaitClose("software - Editor")
    FileDelete("S:\Betriebssysteme\Auto Install Software\software.txt")

    [/autoit]
  • Ansonsten würds aber auch noch so gehen, hier werden einfach die alten Controls gelöscht und durch neue ersetzt...
    nicht sehr elegant was die codelänge betrifft aber wenn das ganze dann noch gut kommentiert wird.
    Im allgemeinen würd ich dir vorschlagen VIEL mehr zu kommentieren was im programm gerade passiert, vermeidet probleme beim späteren nachbearbeiten ;)


    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $Form1_1 = GUICreate("Auto Install", 571, 405, 355, 285)
    $Button1 = GUICtrlCreateButton("32 Bit System", 72, 136, 139, 33)
    $Button2 = GUICtrlCreateButton("64 Bit System", 72, 192, 139, 33)
    $Button3 = GUICtrlCreateButton("Notebook", 72, 248, 139, 33)
    $Button4 = GUICtrlCreateButton("Manuell", 72, 304, 139, 33)
    $Label1 = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 92)
    $Button5 = GUICtrlCreateButton("Software auslesen", 336, 248, 139, 33)
    $Label2 = GUICtrlCreateLabel(" Extras ", 352, 136, 105, 33)
    GUICtrlSetFont(-1, 18, 800, 4, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button6 = GUICtrlCreateButton("Systeminformationen", 336, 192, 139, 33)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 32bit.exe")
    Case $Button2
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\PC 64bit.exe")
    Case $Button3
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notebooks.exe")
    Case $Button4 ; Manuelle installation
    GUICtrlDelete($Button1)
    GUICtrlDelete($Button2)
    GUICtrlDelete($Button3)
    GUICtrlDelete($Button4)
    GUICtrlDelete($Label1)
    GUICtrlDelete($Logo)
    GUICtrlDelete($Button5)
    GUICtrlDelete($Button6)
    GUICtrlDelete($Label2)
    $Label1 = GUICtrlCreateLabel("Copyright © by EDV Consulting GmbH. Alle Rechte vorbehalten", 264, 384, 304, 17)
    $Logo = GUICtrlCreatePic("S:\Betriebssysteme\Auto Install Software\Design\Logo mit Zusatz.jpg", 16, 16, 540, 100)
    $Checkbox1 = GUICtrlCreateCheckbox(" 7-Zip", 48, 144, 121, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox2 = GUICtrlCreateCheckbox("Acrobat Reader", 48, 184, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox3 = GUICtrlCreateCheckbox("Flash Player", 48, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox4 = GUICtrlCreateCheckbox("Cisco VPN Client", 48, 264, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox5 = GUICtrlCreateCheckbox("Ferrari Fax", 48, 304, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox6 = GUICtrlCreateCheckbox("Free PDF", 216, 144, 137, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox7 = GUICtrlCreateCheckbox("iTunes", 216, 184, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox8 = GUICtrlCreateCheckbox("Java", 216, 224, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox9 = GUICtrlCreateCheckbox("ESET NOD32", 216, 264, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox10 = GUICtrlCreateCheckbox("Notepad++", 216, 304, 113, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox11 = GUICtrlCreateCheckbox("WSUS Client", 384, 144, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox12 = GUICtrlCreateCheckbox("Ashampo 6 ", 384, 184, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox13 = GUICtrlCreateCheckbox("Office 2010", 384, 224, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox14 = GUICtrlCreateCheckbox("JMS", 384, 264, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox15 = GUICtrlCreateCheckbox("OMS", 384, 304, 161, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Button1 = GUICtrlCreateButton("Installieren", 48, 344, 163, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("iTunes x64", 216, 200, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox17 = GUICtrlCreateCheckbox("Java x64", 216, 240, 145, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox18 = GUICtrlCreateCheckbox("ESET NOD32 x64", 216, 280, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox19 = GUICtrlCreateCheckbox("Cisco VPN Clientx64", 48, 280, 169, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox20 = GUICtrlCreateCheckbox("Flash Player x64", 48, 240, 153, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    $Checkbox21 = GUICtrlCreateCheckbox(" 7-Zip x64", 48, 160, 129, 17)
    GUICtrlSetFont(-1, 10, 800, 0, "Verdana")
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    If GUICtrlRead($checkbox1) = 1 Then
    $Checkbox1 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip.exe")
    EndIf
    If GUICtrlRead($checkbox2) = 1 Then
    $Checkbox2 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Acrobat Reader.exe")
    EndIf
    If GUICtrlRead($checkbox3) = 1 Then
    $Checkbox3 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player.exe")
    EndIf
    If GUICtrlRead($checkbox4) = 1 Then
    $Checkbox4 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client.exe")
    EndIf
    If GUICtrlRead($checkbox5) = 1 Then
    $Checkbox5 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ferrari Fax.exe")
    EndIf
    If GUICtrlRead($checkbox6) = 1 Then
    $Checkbox6 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\FreePDF.exe")
    EndIf
    If GUICtrlRead($checkbox7) = 1 Then
    $Checkbox7 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes.exe")
    EndIf
    If GUICtrlRead($checkbox8) = 1 Then
    $Checkbox8 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Java.exe")
    EndIf
    If GUICtrlRead($checkbox9) = 1 Then
    $Checkbox9 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32.exe")
    EndIf
    If GUICtrlRead($Checkbox10) = 1 Then
    $Checkbox10 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Notepad.exe")
    EndIf
    If GUICtrlRead($checkbox11) = 1 Then
    $Checkbox11 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\WSUS.exe")
    EndIf
    If GUICtrlRead($checkbox12) = 1 Then
    $Checkbox12 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Ashampoo.exe")
    EndIf
    If GUICtrlRead($checkbox13) = 1 Then
    $Checkbox13 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Office 2010.exe")
    EndIf
    ; JMS
    If GUICtrlRead($checkbox14) = 1 Then
    $Checkbox14 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    ; OMS
    If GUICtrlRead($checkbox15) = 1 Then
    $Checkbox15 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\.exe")
    EndIf
    If GUICtrlRead($checkbox16) = 1 Then
    $Checkbox16 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\iTunes64.exe")
    EndIf
    If GUICtrlRead($checkbox17) = 1 Then
    $Checkbox17 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\java64.exe")
    EndIf
    If GUICtrlRead($checkbox18) = 1 Then
    $Checkbox18 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\ESET NOD32 64.exe")
    EndIf
    If GUICtrlRead($checkbox19) = 1 Then
    $Checkbox19 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Cisco VPN Client64.exe")
    EndIf
    If GUICtrlRead($Checkbox20) = 1 Then
    $Checkbox20 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Flash Player 64.exe")
    EndIf
    If GUICtrlRead($Checkbox21) = 1 Then
    $Checkbox21 = RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\7-Zip64.exe")
    EndIf
    Exit
    EndSwitch
    WEnd
    Case $Button5 ; Software auslesen
    Case $Button6 ; Systeminfo auslesen
    RunWait("S:\Betriebssysteme\Auto Install Software\Scripts\Systeminfo.exe")
    Case $Logo
    EndSwitch
    WEnd

    [/autoit]

    Bild1: Ich beim debuggen

  • Mit dem Komentieren werd ich mir merken... danke :)

  • Wie ist "ein script" gemeint...externe VBA oder batch etwa? Falls normal in AutoIt wüsst ich nicht was da spezielles zu beachten sein sollte O_o

    Edit: Und das allseits verhasst AutoIT würd ich auch durch ein AutoIt austauschen...erspart blöde kommentare wie den den du gerade liesst ;)

    Bild1: Ich beim debuggen

  • Hi,
    Deine Software liegt im Ordner: "S:\Betriebssysteme\Auto Install Software\Scripts\"! Warum liest Du den Ordner nicht aus und erstellst die Controls dynamisch? 8)

    Spoiler anzeigen
    [autoit]


    #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

    [/autoit] [autoit][/autoit] [autoit]

    #RequireAdmin
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode", 1) ;i Eine Gute Wahl -> mehr Macros, leichtere Fenstertechnik

    [/autoit] [autoit][/autoit] [autoit]

    #region ### START Koda GUI section ###
    GUICreate("Software Installer", 896, 560)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_ende")
    GUICtrlCreateGroup("", 170, 31, 185, 485)
    GUICtrlCreateLabel("Silent Install", 182, 16, 185, 17)
    ;i #### Start Checkboxarray für 25 Checkboxen ###
    Global $aLBckbColumn1[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
    "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
    "21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
    ;i a- Array + Label-LB + Checkbox-ckb
    Global $aCkbColumn1[25], $aLBColumn1[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
    ;i a- Array + Checkbox-ckb
    For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
    $aCkbColumn1[$i] = GUICtrlCreateCheckbox($aLBckbColumn1[$i], 178, 40 + $i * 19, 13, 13)
    $aLBColumn1[$i] = GUICtrlCreateLabel($aLBckbColumn1[$i], 200, 40 + $i * 19, 120, 17)
    Next
    ;i #### Ende Checkboxarray ###
    GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessen

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateGroup("", 355, 31, 185, 485)
    GUICtrlCreateLabel("User default", 367, 16, 185, 17)
    ;i #### Start Checkboxarray für 25 Checkboxen ###
    Global $aLBckbColumn2[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
    "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
    "21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
    ;i a- Array + Label-LB + Checkbox-ckb
    Global $aCkbColumn2[25], $aLBColumn2[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
    ;i a- Array + Checkbox-ckb
    For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
    $aCkbColumn2[$i] = GUICtrlCreateCheckbox($aLBckbColumn2[$i], 363, 40 + $i * 19, 13, 13)
    $aLBColumn2[$i] = GUICtrlCreateLabel($aLBckbColumn2[$i], 386, 40 + $i * 19, 120, 17)
    ; create 25x Checkbox
    Next
    ;i #### Ende Checkboxarray ###
    GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessen

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateGroup("", 540, 31, 185, 485)
    GUICtrlCreateLabel("Portable Apps", 552, 16, 185, 17)
    ;i #### Start Checkboxarray für 25 Checkboxen ###
    Global $aLBckbColumn3[25] = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", _
    "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
    "21", "22", "23", "24", "25"] ;i zur Beschriftung der Labels
    ;i a- Array + Label-LB + Checkbox-ckb
    Global $aCkbColumn3[25], $aLBColumn3[25] ;i ArrayVariablen (kl. a am Anfang) erstellen der Controls
    ;i a- Array + Checkbox-ckb
    For $i = 0 To 24 ;i statisch kein Ubound - erstellen von 0 - 24 = 25 Checkboxen
    $aCkbColumn3[$i] = GUICtrlCreateCheckbox($aLBckbColumn3[$i], 548, 40 + $i * 19, 13, 13)
    $aLBColumn2[$i] = GUICtrlCreateLabel($aLBckbColumn3[$i], 571, 40 + $i * 19, 120, 17)
    ; create 25x Checkbox
    Next
    ;i #### Ende Checkboxarray ###
    GUICtrlCreateGroup("", -99, -99, 1, 1) ;i Gruppe schliessen

    [/autoit] [autoit][/autoit] [autoit]

    Global $bnInstall = GUICtrlCreateButton("Install", 355, 526, 75, 22)
    GUICtrlSetOnEvent(-1, "_start")
    Global $bnExit = GUICtrlCreateButton("Exit", 465, 526, 75, 22)
    GUICtrlSetOnEvent(-1, "_ende")

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(100)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _start()
    MsgBox(0, "Start", "Start der Installation ..." & @TAB)
    Exit
    EndFunc ;==>_start

    [/autoit] [autoit][/autoit] [autoit]

    Func _ende()
    Exit
    EndFunc ;==>_ende

    [/autoit] [autoit][/autoit] [autoit]

    ;~ Ende

    [/autoit]