Jump to content

WinWait Error Timeout


MHz
 Share

Recommended Posts

Run(@ScriptDir & '\i386\winnt32.exe /cmdcons', '', @SW_HIDE)

WinWaitActive('Windows Setup', '', 10)
If @error = 1 then Exit
Send('!y')

Success: Returns 1.

Failure: Returns 0 if timeout occurred.

Why does error = 1 in the script let the installation proceed but error = 0 quits?
Link to comment
Share on other sites

The value of $WinActivated can be 1 or 0 in the following example.

@error is not set when using the function. And when @error is not set (not mentioned in the help file page) it is equal to 0.

Run(@ScriptDir & '\i386\winnt32.exe /cmdcons', '', @SW_HIDE)

$WinActivated = WinWaitActive('Windows Setup', '', 10)
If NOT $WinActivated then Exit
Send('!y')
Edited by SlimShady
Link to comment
Share on other sites

I don't understand your problem becauseĀ  on @error= 1 the script exit

<{POST_SNAPBACK}>

But, when when @error = 1, the script continues? Does not quit.

Seems inverse to what the guide states?

I understand the line to be If @error = 0 then Exit. That would mean that timeout occured and script would exit. As in failure?

Link to comment
Share on other sites

But, when when @error = 1, the script continues? Does not quit.

Seems inverse to what the guide states?

I understand the line to be If @error = 0 then Exit. That would mean that timeout occured and script would exit. As in failure?

<{POST_SNAPBACK}>

Sorry for my answer I should have say that WinWaitActive never set @error so the correct code is the SlimShady one :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...