GUI funktioniert nicht

  • Ich habe wieder ein Problem...
    Mein Script:


    [autoit]

    $Form2 = GUICreate("Form2", 320, 253, 189, 123)
    $Checkbox1 = GUICtrlCreateCheckbox ("PDFCreator", 70, 61, 97, 17)
    $Checkbox2 = GUICtrlCreateCheckbox ("Foxit Reader", 70, 77, 97, 17)
    $Checkbox3 = GUICtrlCreateCheckbox ("Firefox", 70, 93, 97, 17)
    $Checkbox4 = GUICtrlCreateCheckbox ("iTunes", 70, 109, 97, 17)
    $Checkbox5 = GUICtrlCreateCheckbox ("Flash", 70, 125, 97, 17)
    $Checkbox6 = GUICtrlCreateCheckbox ("Shockwave", 174, 61, 97, 17)
    $Checkbox7 = GUICtrlCreateCheckbox ("Java", 174, 77, 97, 17)
    $Checkbox8 = GUICtrlCreateCheckbox ("XenAppHosted", 174, 93, 97, 17)
    $Checkbox9 = GUICtrlCreateCheckbox ("7Zip", 174, 109, 97, 17)
    $Checkbox10 = GUICtrlCreateCheckbox ("Citrixkonto", 174, 125, 97, 17)
    $Checkbox11 = GUICtrlCreateCheckbox ("Windowsupdate", 70, 45, 97, 17)
    $Button1 = GUICtrlCreateButton ("Ausführen", 72, 152, 75, 25)
    GUISetState(@SW_SHOW)

    Do
    $Msg = GUIGetMsg()
    If $Msg = $Button1 Then

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

    Run("7Zip.exe")
    WinWaitActive("7-Zip 4.65 Setup", "Choose Install Location")
    ControlClick("7-Zip 4.65 Setup", "Choose Install Location", "Button2")
    WinWaitActive("7-Zip 4.65 Setup", "Completing the 7-Zip")
    ControlClick("7-Zip 4.65 Setup", "Completing the 7-Zip", "Button2")
    Until $Msg = $GUI_EVENT_CLOSE or False

    [/autoit]

    (Ich habe den Rest weggekürzt, ohne 7Zip klappt alles wunderbar, nur wenn ich versuche 7Zip auch versuche mit einzubinden klappts nicht)

    Jetzt ist meine Frage was muss ich daran ändern damits funktioniert?

    Einmal editiert, zuletzt von skybor1994 (14. November 2011 um 12:33)

  • Durch das Script wird ein GUI Fenster erstellt . Wenn ich dann eins von den Checkboxen auswähle wird ein Script zur Installation ausgeführt, also ja.

  • Wie gesagt ich habn bisschen was weggekürzt, 300 zeilen wären nen bisschen zu viel :D

    danke schonmal, hoffentlich findest du was :D

  • Ich denke so sollte es funktionieren..

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <ButtonConstants.au3>
    #include <WindowsConstants.au3>

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

    $Form2 = GUICreate("Form2", 320, 253, 189, 123)
    $Checkbox1 = GUICtrlCreateCheckbox ("PDFCreator", 70, 61, 97, 17)
    $Checkbox2 = GUICtrlCreateCheckbox ("Foxit Reader", 70, 77, 97, 17)
    $Checkbox3 = GUICtrlCreateCheckbox ("Firefox", 70, 93, 97, 17)
    $Checkbox4 = GUICtrlCreateCheckbox ("iTunes", 70, 109, 97, 17)
    $Checkbox5 = GUICtrlCreateCheckbox ("Flash", 70, 125, 97, 17)
    $Checkbox6 = GUICtrlCreateCheckbox ("Shockwave", 174, 61, 97, 17)
    $Checkbox7 = GUICtrlCreateCheckbox ("Java", 174, 77, 97, 17)
    $Checkbox8 = GUICtrlCreateCheckbox ("XenAppHosted", 174, 93, 97, 17)
    $Checkbox9 = GUICtrlCreateCheckbox ("7Zip", 174, 109, 97, 17)
    $Checkbox10 = GUICtrlCreateCheckbox ("Citrixkonto", 174, 125, 97, 17)
    $Checkbox11 = GUICtrlCreateCheckbox ("Windowsupdate", 70, 45, 97, 17)
    $Button1 = GUICtrlCreateButton ("Ausführen", 72, 152, 75, 25)
    GUISetState(@SW_SHOW)

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

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    If GUICtrlRead($checkbox9)=1 Then
    Run(@ScriptDir & "\7Zip.exe")
    WinWaitActive("7-Zip 4.65 Setup", "Choose Install Location")
    ControlClick("7-Zip 4.65 Setup", "Choose Install Location", "Button2")
    WinWaitActive("7-Zip 4.65 Setup", "Completing the 7-Zip")
    ControlClick("7-Zip 4.65 Setup", "Completing the 7-Zip", "Button2")
    EndIf
    EndSwitch
    WEnd

    [/autoit]
  • kein thema^^
    wenn was is dann weißte ja was zu tun ist ;)

    Edit: Bearbeite bitte dein 1. Post und setze das Präfix auf "geschlossen" :D