Programm starten nicht

  • #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ProgressConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=C:\Users\Nico\Desktop\Koda\Fast Open Sec.kxf
    $StartForm = GUICreate("Fast Open Sec", 293, 96, 284, 328)
    GUISetBkColor(0xA6CAF0)
    $Button1 = GUICtrlCreateButton("Scan", 128, 8, 75, 25)
    $Radio1 = GUICtrlCreateRadio("Kurz", 8, 24, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio2 = GUICtrlCreateRadio("Vollständig", 8, 48, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Progress1 = GUICtrlCreateProgress(8, 72, 150, 17)
    $Button2 = GUICtrlCreateButton("Back To FO", 128, 32, 75, 25)
    $Button3 = GUICtrlCreateButton("Close", 200, 8, 75, 25)
    $Button4 = GUICtrlCreateButton("Homepage", 200, 32, 75, 25)
    GUICtrlSetState($Button1,$GUI_DISABLE)
    GUICtrlSetState($Button4,$GUI_DISABLE)
    GUICtrlSetState($Radio1,$GUI_DISABLE)
    GUICtrlSetState($Radio2,$GUI_DISABLE)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button3
    aaa()
    Case $Button2
    aab()


    EndSwitch
    WEnd

    Func aaa()
    Exit
    EndFunc

    Func aab()
    Run("C:\Benutzer\Nico\Desktop\Start\FO.exe")
    EndFunc

  • Willkommen und viel Spaß hier!
    Hi, hier mal ein Vorschlag. ;)
    Tipp:
    Versuche Deinen Variablen einen sprechenden Namen zugeben, dann ist das Script für Dich übersichtlicher ($Button1 umbenenen in $btnScan sprich: $ Button Scan).

    [autoit]


    #region ### START Koda GUI section ###
    $StartForm = GUICreate("Fast Open Sec", 293, 96, 284, 328)
    GUISetBkColor(0xA6CAF0)
    $Button1 = GUICtrlCreateButton("Scan", 128, 8, 75, 25)
    GUICtrlSetState(-1, 128);$GUI_DISABLE
    $Radio1 = GUICtrlCreateRadio("Kurz", 8, 24, 113, 17)
    GUICtrlSetState(-1, 128);$GUI_DISABLE
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio2 = GUICtrlCreateRadio("Vollständig", 8, 48, 113, 17)
    GUICtrlSetState(-1, 128);$GUI_DISABLE
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Progress1 = GUICtrlCreateProgress(8, 72, 150, 17)
    $Button2 = GUICtrlCreateButton("Back To FO", 128, 32, 75, 25)
    $Button3 = GUICtrlCreateButton("Close", 200, 8, 75, 25)
    $Button4 = GUICtrlCreateButton("Homepage", 200, 32, 75, 25)
    GUICtrlSetState(-1, 128);$GUI_DISABLE

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

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

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

    #region ### START SwitchLoop section ###
    While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Button3, -3 ;$GUI_EVENT_CLOSE
    ExitLoop
    Case $Button2
    Run("C:\Users\Nico\Desktop\Start\FO.exe")
    ;Run("C:\Benutzer\Nico\Desktop\Start\FO.exe")
    EndSwitch
    WEnd
    #endregion ### START SwitchLoop section ###
    ; Ende

    [/autoit]