Installations-Menü

  • Hallo,

    Habe jetzt für alle meine Programme ein autoit Scripte zum automatisieren. :thumbup:
    Jetzt möchte ich aber noch ne GUI, wo ich auswählen kann, ( anhaken ) was installiert werden soll, und dann auf installieren und dann soll er die scripte nacheinander aufrufen, und zum schluss neu starten. Geht dass irgendwie mit autoit ?
    Habe selber erst vor kurzem angefangen, also bräuchte ich seeehr viel Hilfe ?( oder jmd netten der dass für mich schreibt. :love:

    Vielen Dank schon mal im vorraus !!!!!!!!!!


    greetings :) mike

  • hi

    mach dir einfach ne gui nach deinen anforderungen...

    und frag dann jede checkbox/radiobutton/sonstwas ab ob installiert werden soll wenn ja: script ausführen wenn nein:mach nichts....


    grez

  • Hört sich ja ganz leicht an , aaaber wie kann ich mir eine GUI machen ?
    Wie kann ich ne checkbox abfragen ?
    Wie kann ic hdann dass ganze nacheinander installieren lassen wenn´s angehackt ist ?

  • hi


    schau dir guicreate,guigetmsg,guictrlcreatecheckbox und guictrlgetdata an. Ein Blick ins tutorail schadet auch nicht :)

    grez

  • Hallo,

    Hab mir jetzt Koda runtergeladen, und dann mal ne GUI ca. nach meinen Wünschen kreiert.
    Wie kann ich jetzt die Abfrage machen lassen, damit er abfragt was angehackt ist und nacheinander installiert werden soll wenn man auf installieren klickt ?
    Wenn man auf Beenden klickt soll es beendet werden.
    DEr Code :

    [autoit]

    #include

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

    #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\mike\desktop\gui.kxf
    $Form1_1 = GUICreate("Form1", 570, 451, 188, 115)
    $Checkbox1 = GUICtrlCreateCheckbox("Acronis True Image 9", 40, 112, 121, 33)
    $Checkbox2 = GUICtrlCreateCheckbox("Adobe Reader", 40, 144, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox3 = GUICtrlCreateCheckbox("AnyDVD", 40, 176, 97, 33)
    $Checkbox4 = GUICtrlCreateCheckbox("ATI Tray Tools", 40, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox5 = GUICtrlCreateCheckbox("AutoIt", 40, 240, 97, 33)
    $Checkbox6 = GUICtrlCreateCheckbox("Avast Antivirus Professional", 40, 272, 153, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox8 = GUICtrlCreateCheckbox("CloneDVD", 40, 368, 97, 33)
    $Checkbox9 = GUICtrlCreateCheckbox("Cabos", 40, 304, 97, 33)
    $Checkbox10 = GUICtrlCreateCheckbox("CloneCD", 40, 336, 97, 33)
    $Checkbox11 = GUICtrlCreateCheckbox("Flash Player", 200, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox12 = GUICtrlCreateCheckbox("foobar2000", 200, 144, 89, 33)
    $Checkbox13 = GUICtrlCreateCheckbox("IrfanView", 200, 176, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox14 = GUICtrlCreateCheckbox("Java", 200, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox15 = GUICtrlCreateCheckbox("K-Lite Codec Pack", 200, 240, 113, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("Mozilla Firefox", 200, 272, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox17 = GUICtrlCreateCheckbox("NET.Framework", 200, 336, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox18 = GUICtrlCreateCheckbox("MS Office 2003", 200, 368, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox19 = GUICtrlCreateCheckbox("Nero 8 Premium", 200, 304, 97, 33)
    $Checkbox21 = GUICtrlCreateCheckbox("Opera", 312, 112, 97, 33)
    $Checkbox22 = GUICtrlCreateCheckbox("PSPad", 312, 144, 97, 33)
    $Checkbox23 = GUICtrlCreateCheckbox("QIP", 312, 176, 97, 33)
    $Checkbox24 = GUICtrlCreateCheckbox("Shockwave Player", 312, 208, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox25 = GUICtrlCreateCheckbox("Skype", 312, 240, 105, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox26 = GUICtrlCreateCheckbox("", 312, 272, 97, 33)
    $Checkbox27 = GUICtrlCreateCheckbox("TuneUP Utilities 2008", 312, 336, 121, 33)
    $Checkbox28 = GUICtrlCreateCheckbox("VLC Media Player", 312, 368, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox29 = GUICtrlCreateCheckbox("TrueCrypt", 312, 304, 97, 33)
    $Checkbox20 = GUICtrlCreateCheckbox("WinRAR 3.62", 448, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox30 = GUICtrlCreateCheckbox("ZoneAlarm Pro", 448, 144, 97, 33)
    $Checkbox36 = GUICtrlCreateCheckbox("registrieren", 448, 240, 97, 33)
    $Button1 = GUICtrlCreateButton("Installieren", 360, 416, 73, 25, 0)
    $Button2 = GUICtrlCreateButton("Beenden", 456, 416, 65, 25, 0)
    $Checkbox39 = GUICtrlCreateCheckbox("Neustart", 272, 424, 73, 17)
    $Checkbox7 = GUICtrlCreateCheckbox("PowerDVD", 448, 208, 97, 33)
    $Checkbox38 = GUICtrlCreateCheckbox("Alcohol 120%", 448, 176, 89, 33)
    $Label1 = GUICtrlCreateLabel("Bitte wählen Sie die zu Installierende Software aus.", 40, 24, 244, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    Hoffe jmd kann mir helfen !

    Danke schon mal .


    greetings :) </GUIConstants.au3>mike

  • Hi racemike551 :D

    Ich glaube das würde dir weiter helfen :

    [autoit]


    While 1

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

    $nMsg = GUIGetMsg()

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

    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE

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

    Exit

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

    Case $Button2

    Exit

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

    Case $Button1

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

    If ** =1 then Run("*")

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

    ;* = die Installationsdatei für das Prog was installiet werden soll wenn die CheckBox dafür angehackt ist :)

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

    ;** = DIe CheckBox Variable für eins der Progs
    ;wenn If ** = 1 nich funct denn probies mal mit If GUICtrlRead(**) = 1 :D
    ; und so machste weiter bis de alle progs drin hast
    EndSwitch
    WEnd

    [/autoit]


    Mir is in moment kein andere lösung eingefallen vllt habe andere ausn board ne andere lösung :)

    _____________
    MfG [KdD]Wolf :rock:

  • Klasse, aber soll ich es einfüpgen oder was und wo ?

    While 1 bis WEnd is eine Schleife, alles was da zwischen steht wird immer wiederholt (mit Sleep() kann man die Zeit zwischen den wiederholungen verlängern). Die Schleife die du hast in dein Script löscht du und da fügst du die Schleife ein die ich geschrieben habe ok??
    Wenn es Probleme gibt poste sie einfach :)

    _____________
    MfG [KdD]Wolf :rock:

  • [autoit]

    #include

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

    #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\mike\desktop\gui.kxf
    $Form1_1 = GUICreate("Form1", 570, 451, 188, 115)
    $Checkbox1 = GUICtrlCreateCheckbox("Acronis True Image 9", 40, 112, 121, 33)
    $Checkbox2 = GUICtrlCreateCheckbox("Adobe Reader", 40, 144, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox3 = GUICtrlCreateCheckbox("AnyDVD", 40, 176, 97, 33)
    $Checkbox4 = GUICtrlCreateCheckbox("ATI Tray Tools", 40, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox5 = GUICtrlCreateCheckbox("AutoIt", 40, 240, 97, 33)
    $Checkbox6 = GUICtrlCreateCheckbox("Avast Antivirus Professional", 40, 272, 153, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox8 = GUICtrlCreateCheckbox("CloneDVD", 40, 368, 97, 33)
    $Checkbox9 = GUICtrlCreateCheckbox("Cabos", 40, 304, 97, 33)
    $Checkbox10 = GUICtrlCreateCheckbox("CloneCD", 40, 336, 97, 33)
    $Checkbox11 = GUICtrlCreateCheckbox("Flash Player", 200, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox12 = GUICtrlCreateCheckbox("foobar2000", 200, 144, 89, 33)
    $Checkbox13 = GUICtrlCreateCheckbox("IrfanView", 200, 176, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox14 = GUICtrlCreateCheckbox("Java", 200, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox15 = GUICtrlCreateCheckbox("K-Lite Codec Pack", 200, 240, 113, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("Mozilla Firefox", 200, 272, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox17 = GUICtrlCreateCheckbox("NET.Framework", 200, 336, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox18 = GUICtrlCreateCheckbox("MS Office 2003", 200, 368, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox19 = GUICtrlCreateCheckbox("Nero 8 Premium", 200, 304, 97, 33)
    $Checkbox21 = GUICtrlCreateCheckbox("Opera", 312, 112, 97, 33)
    $Checkbox22 = GUICtrlCreateCheckbox("PSPad", 312, 144, 97, 33)
    $Checkbox23 = GUICtrlCreateCheckbox("QIP", 312, 176, 97, 33)
    $Checkbox24 = GUICtrlCreateCheckbox("Shockwave Player", 312, 208, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox25 = GUICtrlCreateCheckbox("Skype", 312, 240, 105, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox26 = GUICtrlCreateCheckbox("Spybot", 312, 272, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox27 = GUICtrlCreateCheckbox("TuneUP Utilities 2008", 312, 336, 121, 33)
    $Checkbox28 = GUICtrlCreateCheckbox("VLC Media Player", 312, 368, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox29 = GUICtrlCreateCheckbox("TrueCrypt", 312, 304, 97, 33)
    $Checkbox20 = GUICtrlCreateCheckbox("WinRAR 3.62", 448, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox30 = GUICtrlCreateCheckbox("ZoneAlarm Pro", 448, 144, 97, 33)
    $Checkbox36 = GUICtrlCreateCheckbox("registrieren", 448, 240, 97, 33)
    $Button1 = GUICtrlCreateButton("Installieren", 360, 416, 73, 25, 0)
    $Button2 = GUICtrlCreateButton("Beenden", 456, 416, 65, 25, 0)
    $Checkbox39 = GUICtrlCreateCheckbox("Neustart", 272, 424, 73, 17)
    $Checkbox7 = GUICtrlCreateCheckbox("PowerDVD", 448, 208, 97, 33)
    $Checkbox38 = GUICtrlCreateCheckbox("Alcohol 120%", 448, 176, 89, 33)
    $Label1 = GUICtrlCreateLabel("Bitte wählen Sie die zu Installierende Software aus.", 40, 24, 244, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1

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

    $nMsg = GUIGetMsg()

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

    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE

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

    Exit

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

    Case $Button2

    Exit

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

    Case $Button1

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

    If ** =1 then Run("*")

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

    ;* = die Installationsdatei für das Prog was installiet werden soll wenn die CheckBox dafür angehackt ist :)

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

    ;** = DIe CheckBox Variable für eins der Progs
    ;wenn If ** = 1 nich funct denn probies mal mit If GUICtrlRead(**) = 1 :D
    ; und so machste weiter bis de alle progs drin hast
    EndSwitch
    WEnd

    [/autoit]

    So ?
    Da wird ja dann nur immer dass gleich Prog gestartet bei verschiedenen häckchen ?
    Wo muss es hin ?</GUIConstants.au3> ?( ?( ?(

  • wenn $Checkbox1 angehackt is dann soll er
    Acronis True Image 9 das starten oda ?
    If $Checkbox1=1 then Run("Acronis True Image 9.exe") << das würde denn so aussehen
    und für den Adobe Reader würde das so aussehen :
    If $Checkbox2=1 then Run("adobe reader install.exe")
    so machste weiter bis de da alle progs drin hast ok

    und wenn das If $Checkbox2=1 then Run("adobe reader install.exe") so nich funct dann muss es so funcen If GuiCtrlRead($Checkbox2)=1 then Run("adobe reader install.exe")

    hoffe du hast das jetzt ein wenig geschnallt :)
    Weiste ich bin nich so gut in erklären :|

  • Soll dass ca. so sein ?

    Spoiler anzeigen

    #include <GUIConstants.au3>

    #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\mike\desktop\gui.kxf
    $Form1_1 = GUICreate("Form1", 570, 451, 188, 115)
    $Checkbox1 = GUICtrlCreateCheckbox("Acronis True Image 9", 40, 112, 121, 33)
    $Checkbox2 = GUICtrlCreateCheckbox("Adobe Reader", 40, 144, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox3 = GUICtrlCreateCheckbox("AnyDVD", 40, 176, 97, 33)
    $Checkbox4 = GUICtrlCreateCheckbox("ATI Tray Tools", 40, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox5 = GUICtrlCreateCheckbox("AutoIt", 40, 240, 97, 33)
    $Checkbox6 = GUICtrlCreateCheckbox("Avast Antivirus Professional", 40, 272, 153, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox8 = GUICtrlCreateCheckbox("CloneDVD", 40, 368, 97, 33)
    $Checkbox9 = GUICtrlCreateCheckbox("Cabos", 40, 304, 97, 33)
    $Checkbox10 = GUICtrlCreateCheckbox("CloneCD", 40, 336, 97, 33)
    $Checkbox11 = GUICtrlCreateCheckbox("Flash Player", 200, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox12 = GUICtrlCreateCheckbox("foobar2000", 200, 144, 89, 33)
    $Checkbox13 = GUICtrlCreateCheckbox("IrfanView", 200, 176, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox14 = GUICtrlCreateCheckbox("Java", 200, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox15 = GUICtrlCreateCheckbox("K-Lite Codec Pack", 200, 240, 113, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("Mozilla Firefox", 200, 272, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox17 = GUICtrlCreateCheckbox("NET.Framework", 200, 336, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox18 = GUICtrlCreateCheckbox("MS Office 2003", 200, 368, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox19 = GUICtrlCreateCheckbox("Nero 8 Premium", 200, 304, 97, 33)
    $Checkbox21 = GUICtrlCreateCheckbox("Opera", 312, 112, 97, 33)
    $Checkbox22 = GUICtrlCreateCheckbox("PSPad", 312, 144, 97, 33)
    $Checkbox23 = GUICtrlCreateCheckbox("QIP", 312, 176, 97, 33)
    $Checkbox24 = GUICtrlCreateCheckbox("Shockwave Player", 312, 208, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox25 = GUICtrlCreateCheckbox("Skype", 312, 240, 105, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox26 = GUICtrlCreateCheckbox("Spybot", 312, 272, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox27 = GUICtrlCreateCheckbox("TuneUP Utilities 2008", 312, 336, 121, 33)
    $Checkbox28 = GUICtrlCreateCheckbox("VLC Media Player", 312, 368, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox29 = GUICtrlCreateCheckbox("TrueCrypt", 312, 304, 97, 33)
    $Checkbox20 = GUICtrlCreateCheckbox("WinRAR 3.62", 448, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox30 = GUICtrlCreateCheckbox("ZoneAlarm Pro", 448, 144, 97, 33)
    $Checkbox36 = GUICtrlCreateCheckbox("registrieren", 448, 240, 97, 33)
    $Button1 = GUICtrlCreateButton("Installieren", 360, 416, 73, 25, 0)
    $Button2 = GUICtrlCreateButton("Beenden", 456, 416, 65, 25, 0)
    $Checkbox39 = GUICtrlCreateCheckbox("Neustart", 272, 424, 73, 17)
    $Checkbox7 = GUICtrlCreateCheckbox("PowerDVD", 448, 208, 97, 33)
    $Checkbox38 = GUICtrlCreateCheckbox("Alcohol 120%", 448, 176, 89, 33)
    $Label1 = GUICtrlCreateLabel("Bitte wählen Sie die zu Installierende Software aus.", 40, 24, 244, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    EndSwitch
    WEnd
    If $Checkbox1=1 then Run("Adobe Rader 8.1.exe")
    If $Checkbox1=2 then Run("ATI.exe")
    If $Checkbox1=2 then Run("AnyDVD.exe")
    If $Checkbox1=4 then Run("autoit.exe")
    If $Checkbox1=5 then Run("avast.exe")
    If $Checkbox1=6 then Run("cabos.exe")
    If $Checkbox1=7 then Run("clonecd.exe")
    If $Checkbox1=8 then Run("clonedvd.exe")
    If $Checkbox1=9 then Run("Flash Player.exe")
    If $Checkbox1=10 then Run("foobar.exe")
    If $Checkbox1=11 then Run("IrfanView.exe")
    If $Checkbox1=12 then Run("Java6.exe")
    If $Checkbox1=13 then Run("K-Lite Mega Codec Pack 3.6.2.exe")
    If $Checkbox1=14 then Run("firefox.exe")
    If $Checkbox1=15 then Run("nero.exe")
    If $Checkbox1=16 then Run("Ari's .NET Framework Pack 2.0.8.exe")
    If $Checkbox1=17 then Run("office.exe")
    If $Checkbox1=18 then Run("opera.exe")
    If $Checkbox1=19 then Run("pspadeditor.exe")
    If $Checkbox1=20 then Run("qip.exe")
    If $Checkbox1=21 then Run("Shokwave.exe")
    If $Checkbox1=22 then Run("skype.exe")
    If $Checkbox1=23 then Run("Spybot.v1.5.1.exe")
    If $Checkbox1=24 then Run("TrueCrypt 4.3a.exe")
    If $Checkbox1=25 then Run("TuneUP Uilities 2008.exe")
    If $Checkbox1=26 then Run("vlc086d_ov.exe")
    If $Checkbox1=27 then Run("winrar.exe")
    If $Checkbox1=28 then Run("zonealarm.exe")
    If $Checkbox1=29 then Run("powerdvd.exe")

    Wird es dann nicht sofort geastertet wenns angehakt ist ? Soll erst starten wennst auf Installieren rückst !
    undauf Neenden soll es beendet werden.

  • Die Schleife muss natürlich hin:

    Spoiler anzeigen
    [autoit]

    While 1

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

    $nMsg = GUIGetMsg()

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

    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE

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

    Exit

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

    Case $Button2

    Exit

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

    Case $Button1
    If GuictrlRead($Checkbox1)=1 then Run("Adobe Rader 8.1.exe")
    If GuictrlRead($Checkbox2)=1 then Run("AnyDVD.exe")
    If GuictrlRead($Checkbox3)=1 then Run("ATI.exe")
    If GuictrlRead($Checkbox4)=1 then Run("autoit.exe")

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

    EndSwitch
    WEnd

    [/autoit]
  • und die 1 muss auch immer sein:

    If $Checkbox1=>>1<< then Run("TuneUP Uilities 2008.exe")

    • Offizieller Beitrag

    Also zum Auslesen von Checkboxen (oder Radio-Button) sollte man doch die AutoIt-Syntax einhalten.

    [autoit]

    If GUICtrlRead($Control) = $GUI_CHECKED / $GUI_UNCHECKED Then

    [/autoit]


    Eine andere Möglichkeit wäre noch:

    [autoit]

    If BitAnd(GUICtrlRead($Control), $GUI_CHECKED) Then

    [/autoit]

    Diese Variante

    [autoit]

    Case $Button1
    If GuictrlRead($Checkbox1)=1 then Run("Adobe Rader 8.1.exe")
    If GuictrlRead($Checkbox2)=1 then Run("AnyDVD.exe")
    If GuictrlRead($Checkbox3)=1 then Run("ATI.exe")
    If GuictrlRead($Checkbox4)=1 then Run("autoit.exe")

    [/autoit]


    hat den Nachteil, dass bei mehreren angehakten Checkboxen versucht wird die Installationen gleichzeitig zu starten.
    Hier sollte RunWait oder ShellExecuteWait verwendet werden, damit alles nacheinander abgearbeitet wird.

  • Hallo,

    Hab jetzt mein Script jetz fast fertig :) Dank der tollen unterstützung vom Board hier und ganz besonders [KdD]Wolf
    Danke an alle die mir geholfen haben !
    Bräuchte jetzt aber nochwas, hab ne Checkbox neu starten, wenn die angehackt ist, solles ganz zum schluss wenn alles andere feritg ist, den computer neu starten. Wie geht dass ?

    Code :

    [autoit]

    #include

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

    #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\mike\desktop\gui.kxf
    $Form1_1 = GUICreate("Software Installer", 570, 451, 188, 115)
    $Checkbox1 = GUICtrlCreateCheckbox("Acronis True Image 9", 40, 112, 121, 33)
    $Checkbox2 = GUICtrlCreateCheckbox("Adobe Reader", 40, 144, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox3 = GUICtrlCreateCheckbox("AnyDVD", 40, 176, 97, 33)
    $Checkbox4 = GUICtrlCreateCheckbox("ATI Tray Tools", 40, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox5 = GUICtrlCreateCheckbox("AutoIt", 40, 240, 97, 33)
    $Checkbox6 = GUICtrlCreateCheckbox("Avast Antivirus Professional", 40, 272, 153, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox8 = GUICtrlCreateCheckbox("CloneDVD", 40, 368, 97, 33)
    $Checkbox9 = GUICtrlCreateCheckbox("Cabos", 40, 304, 97, 33)
    $Checkbox10 = GUICtrlCreateCheckbox("CloneCD", 40, 336, 97, 33)
    $Checkbox11 = GUICtrlCreateCheckbox("Flash Player", 200, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox12 = GUICtrlCreateCheckbox("foobar2000", 200, 144, 89, 33)
    $Checkbox13 = GUICtrlCreateCheckbox("IrfanView", 200, 176, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox14 = GUICtrlCreateCheckbox("Java", 200, 208, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox15 = GUICtrlCreateCheckbox("K-Lite Codec Pack", 200, 240, 113, 33)
    $Checkbox16 = GUICtrlCreateCheckbox("Mozilla Firefox", 200, 272, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox17 = GUICtrlCreateCheckbox("NET.Framework", 200, 336, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox18 = GUICtrlCreateCheckbox("MS Office 2003", 200, 368, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox19 = GUICtrlCreateCheckbox("Nero 8 Premium", 200, 304, 97, 33)
    $Checkbox21 = GUICtrlCreateCheckbox("Opera", 312, 112, 97, 33)
    $Checkbox22 = GUICtrlCreateCheckbox("PSPad", 312, 144, 97, 33)
    $Checkbox23 = GUICtrlCreateCheckbox("QIP", 312, 176, 97, 33)
    $Checkbox24 = GUICtrlCreateCheckbox("Shockwave Player", 312, 208, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox25 = GUICtrlCreateCheckbox("Skype", 312, 240, 105, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox26 = GUICtrlCreateCheckbox("Spybot", 312, 272, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox27 = GUICtrlCreateCheckbox("TuneUP Utilities 2008", 312, 336, 121, 33)
    $Checkbox28 = GUICtrlCreateCheckbox("VLC Media Player", 312, 368, 113, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox29 = GUICtrlCreateCheckbox("TrueCrypt", 312, 304, 97, 33)
    $Checkbox20 = GUICtrlCreateCheckbox("WinRAR 3.62", 448, 112, 97, 33)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $Checkbox30 = GUICtrlCreateCheckbox("ZoneAlarm Pro", 448, 144, 97, 33)
    $Checkbox36 = GUICtrlCreateCheckbox("registrieren", 448, 240, 97, 33)
    $Button1 = GUICtrlCreateButton("Installieren", 360, 416, 73, 25, 0)
    $Button2 = GUICtrlCreateButton("Beenden", 456, 416, 65, 25, 0)
    $Checkbox39 = GUICtrlCreateCheckbox("Neustart", 272, 424, 73, 17)
    $Checkbox7 = GUICtrlCreateCheckbox("PowerDVD", 448, 208, 97, 33)
    $Checkbox38 = GUICtrlCreateCheckbox("Alcohol 120%", 448, 176, 89, 33)
    $Label1 = GUICtrlCreateLabel("Bitte wählen Sie die zu Installierende Software aus.", 40, 24, 244, 17)
    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 RunWait("foobar2000_0.9.5.exe")
    If GUICtrlRead($Checkbox2)=1 then RunWait("ATI.exe")
    If GUICtrlRead($Checkbox3)=1 then RunWait("AnyDVD.exe")
    If GUICtrlRead($Checkbox4)=1 then RunWait("autoit.exe")
    If GUICtrlRead($Checkbox5)=1 then RunWait("avast.exe")
    If GUICtrlRead($Checkbox6)=1 then RunWait("cabos.exe")
    If GUICtrlRead($Checkbox7)=1 then RunWait("clonecd.exe")
    If GUICtrlRead($Checkbox8)=1 then RunWait("clonedvd.exe")
    If GUICtrlRead($Checkbox9)=1 then RunWait("Flash Player.exe")
    If GUICtrlRead($Checkbox10)=1 then RunWait("foobar.exe")
    If GUICtrlRead($Checkbox11)=1 then RunWait("IrfanView.exe")
    If GUICtrlRead($Checkbox12)=1 then RunWait("Java6.exe")
    If GUICtrlRead($Checkbox13)=1 then RunWait("K-Lite Mega Codec Pack 3.6.2.exe")
    If GUICtrlRead($Checkbox14)=1 then RunWait("firefox.exe")
    If GUICtrlRead($Checkbox15)=1 then RunWait("nero.exe")
    If GUICtrlRead($Checkbox15)=1 then RunWait("Ari's .NET Framework Pack 2.0.8.exe")
    If GUICtrlRead($Checkbox17)=1 then RunWait("office.exe")
    If GUICtrlRead($Checkbox18)=1 then RunWait("opera.exe")
    If GUICtrlRead($Checkbox19)=1 then RunWait("pspadeditor.exe")
    If GUICtrlRead($Checkbox20)=1 then RunWait("qip.exe")
    If GUICtrlRead($Checkbox21)=1 then RunWait("Shokwave.exe")
    If GUICtrlRead($Checkbox22)=1 then RunWait("skype.exe")
    If GUICtrlRead($Checkbox23)=1 then RunWait("Spybot.v1.5.1.exe")
    If GUICtrlRead($Checkbox24)=1 then RunWait("TrueCrypt 4.3a.exe")
    If GUICtrlRead($Checkbox25)=1 then RunWait("TuneUP Uilities 2008.exe")
    If GUICtrlRead($Checkbox26)=1 then RunWait("vlc086d_ov.exe")
    If GUICtrlRead($Checkbox27)=1 then RunWait("winrar.exe")
    If GUICtrlRead($Checkbox28)=1 then RunWait("zonealarm.exe")
    If GUICtrlRead($Checkbox29)=1 then RunWait("powerdvd.exe")
    If GUICtrlRead($Checkbox30)=1 then RunWait("Acronis True Image 9.exe")
    case $Button2
    Exit

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

    EndSwitch
    WEnd

    [/autoit]


    </GUIConstants.au3>

  • So:
    Habs jetzt mein Script :

    [autoit]

    #include

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

    #Region ### START Koda GUI section ### Form=c:\dokumente und einstellungen\mike\desktop\software installer.kxf
    $Form1 = GUICreate("Software Installer", 508, 419, 296, 199)
    $Label1 = GUICtrlCreateLabel("Bitte wählen Sie die zu Installierende Software aus.", 8, 16, 244, 17)
    $Checkbox1 = GUICtrlCreateCheckbox("CloneDVD", 64, 312, 121, 25)
    $Checkbox2 = GUICtrlCreateCheckbox("ATI Tray Tools", 64, 152, 121, 25)
    $Checkbox3 = GUICtrlCreateCheckbox("AutoIt", 64, 184, 121, 25)
    $Checkbox4 = GUICtrlCreateCheckbox("CloneCD", 64, 280, 121, 25)
    $Checkbox5 = GUICtrlCreateCheckbox("Avast AntiVirus Professional", 64, 216, 153, 25)
    $Checkbox6 = GUICtrlCreateCheckbox("Acronis True Image", 64, 56, 121, 25)
    $Checkbox7 = GUICtrlCreateCheckbox("Adobe Reader", 64, 88, 121, 25)
    $Checkbox8 = GUICtrlCreateCheckbox("Cabos", 64, 248, 121, 25)
    $Checkbox9 = GUICtrlCreateCheckbox("AnyDVD", 64, 120, 121, 25)
    $Checkbox10 = GUICtrlCreateCheckbox("Flash Player", 64, 344, 121, 25)
    $Checkbox11 = GUICtrlCreateCheckbox("MS Office 2003", 224, 312, 121, 25)
    $Checkbox12 = GUICtrlCreateCheckbox("K-Lite Codec Pack", 224, 152, 121, 25)
    $Checkbox13 = GUICtrlCreateCheckbox("Koda", 224, 184, 121, 25)
    $Checkbox14 = GUICtrlCreateCheckbox("NET.Framework", 224, 280, 121, 25)
    $Checkbox15 = GUICtrlCreateCheckbox("Mozilla Firefox", 224, 216, 121, 25)
    $Checkbox16 = GUICtrlCreateCheckbox("foobar2000", 224, 56, 121, 25)
    $Checkbox17 = GUICtrlCreateCheckbox("IrfanView", 224, 88, 121, 25)
    $Checkbox18 = GUICtrlCreateCheckbox("Nero 8 Premium", 224, 248, 121, 25)
    $Checkbox19 = GUICtrlCreateCheckbox("Java", 224, 120, 121, 25)
    $Checkbox20 = GUICtrlCreateCheckbox("Opera", 224, 344, 121, 25)
    $Checkbox21 = GUICtrlCreateCheckbox("WinRAR", 376, 312, 121, 25)
    $Checkbox22 = GUICtrlCreateCheckbox("Skype", 376, 152, 121, 25)
    $Checkbox23 = GUICtrlCreateCheckbox("Spybot", 376, 184, 121, 25)
    $Checkbox24 = GUICtrlCreateCheckbox("VLC Media Player", 376, 280, 121, 25)
    $Checkbox25 = GUICtrlCreateCheckbox("True Crypt", 376, 216, 121, 25)
    $Checkbox26 = GUICtrlCreateCheckbox("PSPad", 376, 56, 121, 25)
    $Checkbox27 = GUICtrlCreateCheckbox("QIP", 376, 88, 121, 25)
    $Checkbox28 = GUICtrlCreateCheckbox("TuneUP Uilities 2008", 376, 248, 121, 25)
    $Checkbox29 = GUICtrlCreateCheckbox("Shockwave Player", 376, 120, 121, 25)
    $Checkbox30 = GUICtrlCreateCheckbox("ZoneAlarm Pro", 376, 344, 121, 25)
    $Button1 = GUICtrlCreateButton("PC-Info", 392, 8, 65, 17, 0)
    $Button2 = GUICtrlCreateButton("Info", 304, 8, 65, 17, 0)
    $Button3 = GUICtrlCreateButton("Beenden", 240, 384, 57, 17, 0)
    $Button4 = GUICtrlCreateButton("Alle", 320, 384, 57, 17, 0)
    $Button5 = GUICtrlCreateButton("Installieren", 160, 384, 57, 17, 0)
    $Button6 = GUICtrlCreateButton("Keine", 400, 384, 57, 17, 0)
    $Checkbox31 = GUICtrlCreateCheckbox("Neustart", 64, 384, 65, 17)
    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
    Run("pc-info.exe")
    Case $Button2
    MsgBox(0,"Info","© 2008 by racemike511 mit Hilfe von [KdD]Wolf")
    case $Button3
    Exit
    Case $Button4
    GUICtrlSetState($Checkbox1,$GUI_CHECKED)
    GUICtrlSetState($Checkbox2,$GUI_CHECKED)
    GUICtrlSetState($Checkbox3,$GUI_CHECKED)
    GUICtrlSetState($Checkbox4,$GUI_CHECKED)
    GUICtrlSetState($Checkbox5,$GUI_CHECKED)
    GUICtrlSetState($Checkbox6,$GUI_CHECKED)
    GUICtrlSetState($Checkbox7,$GUI_CHECKED)
    GUICtrlSetState($Checkbox8,$GUI_CHECKED)
    GUICtrlSetState($Checkbox9,$GUI_CHECKED)
    GUICtrlSetState($Checkbox10,$GUI_CHECKED)
    GUICtrlSetState($Checkbox11,$GUI_CHECKED)
    GUICtrlSetState($Checkbox12,$GUI_CHECKED)
    GUICtrlSetState($Checkbox13,$GUI_CHECKED)
    GUICtrlSetState($Checkbox14,$GUI_CHECKED)
    GUICtrlSetState($Checkbox15,$GUI_CHECKED)
    GUICtrlSetState($Checkbox16,$GUI_CHECKED)
    GUICtrlSetState($Checkbox17,$GUI_CHECKED)
    GUICtrlSetState($Checkbox18,$GUI_CHECKED)
    GUICtrlSetState($Checkbox19,$GUI_CHECKED)
    GUICtrlSetState($Checkbox20,$GUI_CHECKED)
    GUICtrlSetState($Checkbox21,$GUI_CHECKED)
    GUICtrlSetState($Checkbox22,$GUI_CHECKED)
    GUICtrlSetState($Checkbox23,$GUI_CHECKED)
    GUICtrlSetState($Checkbox24,$GUI_CHECKED)
    GUICtrlSetState($Checkbox25,$GUI_CHECKED)
    GUICtrlSetState($Checkbox26,$GUI_CHECKED)
    GUICtrlSetState($Checkbox27,$GUI_CHECKED)
    GUICtrlSetState($Checkbox28,$GUI_CHECKED)
    GUICtrlSetState($Checkbox29,$GUI_CHECKED)
    GUICtrlSetState($Checkbox30,$GUI_CHECKED)

    case $Button5
    If GUICtrlRead($Checkbox1)=1 then RunWait("acronis\Acronis True Image 9.exe")
    If GUICtrlRead($Checkbox2)=1 then RunWait("adobe_reader\Adobe Rader 8.1.exe")
    If GUICtrlRead($Checkbox3)=1 then RunWait("anydvd\AnyDVD.exe")
    If GUICtrlRead($Checkbox4)=1 then RunWait("ati\ATI.exe")
    If GUICtrlRead($Checkbox5)=1 then RunWait("autoit\autoit.exe")
    If GUICtrlRead($Checkbox5)=1 then RunWait("autoit\german.exe")
    If GUICtrlRead($Checkbox6)=1 then RunWait("avast\avast.exe")
    If GUICtrlRead($Checkbox7)=1 then RunWait("cabos\cabos.exe")
    If GUICtrlRead($Checkbox 8) =1 then RunWait("clonecd\clonecd.exe")
    If GUICtrlRead($Checkbox9)=1 then RunWait("clonedvd\clonedvd.exe")
    If GUICtrlRead($Checkbox10)=1 then RunWait("flash\Flash Player.exe")
    If GUICtrlRead($Checkbox11)=1 then RunWait("foobar\foobar.exe")
    If GUICtrlRead($Checkbox11)=1 then RunWait("foobar\addons.exe")
    If GUICtrlRead($Checkbox12)=1 then RunWait("irfanview\irfanview.exe")
    If GUICtrlRead($Checkbox13)=1 then RunWait("java\Java6.exe")
    If GUICtrlRead($Checkbox14)=1 then RunWait("k-lite\K-Lite Mega Codec Pack 3.6.2.exe")
    If GUICtrlRead($Checkbox15)=1 then RunWait("koda\koda_1.7.0.1.exe")
    If GUICtrlRead($Checkbox15)=1 then RunWait("firefox\firefox.exe")
    If GUICtrlRead($Checkbox15)=1 then RunWait("firefox\firefox_addons.exe")
    If GUICtrlRead($Checkbox17)=1 then RunWait("nero\nero.txt")
    If GUICtrlRead($Checkbox1 8) =1 then RunWait("framework\Ari's .NET Framework Pack 2.0.8.exe")
    If GUICtrlRead($Checkbox19)=1 then RunWait("office03\office.exe")
    If GUICtrlRead($Checkbox20)=1 then RunWait("opera\opera.exe")
    If GUICtrlRead($Checkbox21)=1 then RunWait("papad\pspadeditor.exe")
    If GUICtrlRead($Checkbox22)=1 then RunWait("qip\qip.exe")
    If GUICtrlRead($Checkbox22)=1 then RunWait("qip\deutsch.exe")
    If GUICtrlRead($Checkbox23)=1 then RunWait("shockwave\Shokwave.exe")
    If GUICtrlRead($Checkbox24)=1 then RunWait("skype\skype.exe")
    If GUICtrlRead($Checkbox25)=1 then RunWait("spybot\Spybot.v1.5.1.exe")
    If GUICtrlRead($Checkbox26)=1 then RunWait("truecrypt\TrueCrypt 4.3a.exe")
    If GUICtrlRead($Checkbox27)=1 then RunWait("tuneup\TuneUP Uilities 2008.exe")
    If GUICtrlRead($Checkbox2 8) =1 then RunWait("vlc\vlc086d_ov.exe")
    If GUICtrlRead($Checkbox29)=1 then RunWait("winrar\winrar.exe")
    If GUICtrlRead($Checkbox30)=1 then RunWait("zonealarm_pro\zonealarm.exe")
    Case $Button6
    GUICtrlSetState($Checkbox1,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox2,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox3,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox4,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox5,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox6,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox7,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox8,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox9,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox10,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox11,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox12,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox13,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox14,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox15,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox16,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox17,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox18,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox19,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox20,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox21,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox22,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox23,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox24,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox25,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox26,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox27,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox28,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox29,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox30,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox31,$GUI_UNCHECKED)
    EndSwitch
    WEnd

    [/autoit]

    W </GUIConstants.au3>as sagt Ihr dazu ?

    Ach ja wie kann ich es so machen ,dass wenn er mit allem fertig ist, dann auch den Computer Neustartet wenn die Checkbox dafür angehackt ist ?

  • habs schon mit If GUICtrlRead($Checkbox1)=1 then Shutdown(2) probiert, funktionierte leider aber nicht.

    • Offizieller Beitrag

    Irgendeine Fehlermeldung?

    Übrigens, erspare dir etwas Schreibarbeit :).
    Packe die Aktionen bei Case $Button6 in eine Schleife:

    Spoiler anzeigen
    [autoit]

    ; Statt:
    Case $Button6
    GUICtrlSetState($Checkbox1,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox2,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox3,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox4,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox5,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox6,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox7,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox8,$GUI_UNCHECKED)
    GUICtrlSetState($Checkbox9,$GUI_UNCHECKED)
    ;......

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

    ; Besser:
    Case $Button6
    For $i = $Checkbox1 To $Checkbox31
    GUICtrlSetState($i, $GUI_UNCHECKED)
    Next

    [/autoit]