Sign in to follow this  
Followers 0
jefhal

@error problems since upgrading

4 posts in this topic

This code now seems to get stuck in a loop. Something must have changed with @error?, but I can't search the forum or help file for @error specifically...

$pid = run(@comspec & " /c \\myserver\apps$\_bin\utils\AdFind.exe -b " & $scope & ' -dn -f name=' & $strComputer,@TempDir,"",$stdout_child)
    While 1
    $out &= StdoutRead($pid)
    If @error = -1 Then ExitLoop     ;;;;; this line never sees the error....
    MsgBox(0, "STDOUT read:", $out)
Wend

Sorry if this is wonderously simple...


...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I'm not a real experianced user in the AutoIt language, but the 16th May, 2008 - v3.2.12.0 version of Autoit included a few @error changes, if you've just upgraded or something... It could be that... I'm using v3.2.12.1, and havn't noticed any @error problems like yours...

You could of course try,

If $PID = 0 Then ExitLoop

Success: The PID of the process that was launched.

Failure: Returns 0 and sets @error to non-zero.

Did Jos or I answer your question satisfactory? Edited by BinaryBrother

Share this post


Link to post
Share on other sites

Thanks Jos! Your tip on the new syntax for @error worked perfectly...

Try:

If @error Then ExitLoop;;;;; this line never sees the error....

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
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
Sign in to follow this  
Followers 0