Messagebox mit timeout

  • Hallo zusammen

    Wie erreiche ich, dass diese Messagebox nur für 2 min erscheint, und dann auch mit dem Exitcode 5 aussteigt, falls der User nicht reagiert?

    [autoit]


    While ProcessExists($ProcessToCheck
    $Msgbox = MsgBox(8192+65,$Titel,"Please close " & $AppToClose & " to install an update or new version of " & $AppToInstall )
    If $Msgbox = 2 Then
    Exit(5)
    Endif
    WEnd

    [/autoit]

    Danke euch,

    Surfy

    Einmal editiert, zuletzt von Surfy (5. Juni 2013 um 15:30)

  • Siehe Hilfe:

    [autoit]

    MsgBox ( flag, "title", "text" [, timeout [, hwnd]] )

    [/autoit]


    Parameter timeout. Wenn das Timeout überschritten worden ist, dann gibt die MsgBox "-1" zurück; danach reicht also sowas: If $iMsgReturn = -1 Then Exit 5

    lg