Splashscreen mit Countdown (schlaufe) - wie andere Abfragen einbauen?

  • Hallo zusammen

    Ich würde gerne während einer installation, den User daran hindern etwas zu machen, bzw einzugreifen.

    Daher würde ich gerne einen Splash-Screen einblenden, der nach ca 10 min verschwindet, und mit Countdown.

    [autoit]


    $countdowntime = 600000 ; also 10 min
    For $i = $countdowntime To 0 Step -60000
    SplashTextOn("", @lf & @lf & "Estimated time to wait " & $i/60000 & " min" & @LF & @LF & "Installing Toad for DB2." & @LF & @LF & "Please wait 10 Minutes. The Mouse and Keyboard are now Locked." ,@DesktopWidth,@DesktopHeight,-1,-1,0+1,"",36)
    BlockInput(1)
    Sleep(60000)
    Next
    SplashOff()
    BlockInput(0)

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

    Das funktioniert soweit auch :huh:

    Nun würde ich aber gerne noch abfragen, ob ein Process namens NGenWrapper.exe eröffnet wird, und solange warten bis er da ist. Dann kann der Splashscreen verschwinden. Nur wie bekomme ich nun die beiden Zeilen, in eine laufende schleife, die ja weiterlaufen soll?

    ProcessWait ( "NGenWrapper.exe")
    ProcessWaitClose("NGenWrapper.exe")


    Danke für eure Hilfe..

  • Spoiler anzeigen
    [autoit]

    $CountDownTime = 10
    BlockInput(1)

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

    For $i = $CountDownTime To 0 Step -1
    SplashTextOn("", @LF & @LF & "Estimated time to wait " & $i & " min" & @LF & @LF & "Installing Toad for DB2." & _
    @LF & @LF & "Please wait 10 Minutes. The Mouse and Keyboard are now Locked.", @DesktopWidth, @DesktopHeight, -1, -1, 0 + 1, "", 36)
    $sTimer = TimerInit()
    Do
    Sleep(100)
    Until TimerDiff($sTimer) >= 60000 Or ProcessExists("NGenWrapper.exe")
    If ProcessExists("NGenWrapper.exe") Then ExitLoop
    Next

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

    SplashOff()
    BlockInput(0)
    MsgBox(262144, "Prozess", "Prozess existiert oder 10mins abgelaufen.")

    [/autoit]
  • /Edit

    @ngen: Danke für deinen Tip!

    Wenn der Prozess von anfang an laufen würde, könnte ich es damit realsieren. Das problem ist aber, das NGenWrapper.exe erst nach ca 5 min startet, und ca 2 min lang geht.

    Daher müsste irgendwie noch eine schleife in die schleife - aber ich kriegs nicht zusammen ;(

    @ blubbsstar: danke dir, dass muss ich nun erstmal verstehen, verdauen ;)

  • Sollte so nun passen:

    Spoiler anzeigen
    [autoit]

    Local $CountDownTime = 10, $Process = False
    BlockInput(1)

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

    For $i = $CountDownTime To 0 Step -1
    SplashTextOn("", @LF & @LF & "Estimated time to wait " & $i & " min" & @LF & @LF & "Installing Toad for DB2." & _
    @LF & @LF & "Please wait 10 Minutes. The Mouse and Keyboard are now Locked.", @DesktopWidth, @DesktopHeight, -1, -1, 0 + 1, "", 36)
    $sTimer = TimerInit()
    Do
    If ProcessExists("NGenWrapper.exe") And $Process = False Then $Process = True
    Sleep(100)
    Until (Not ProcessExists("NGenWrapper.exe") And $Process = True) Or TimerDiff($sTimer) >= 60000
    If Not ProcessExists("NGenWrapper.exe") And $Process = True Then ExitLoop
    Next

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

    SplashOff()
    BlockInput(0)
    MsgBox(262144, "Prozess", "ende.")

    [/autoit]