Jump to content

@error problems since upgrading


jefhal
 Share

Recommended Posts

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
Link to comment
Share on other sites

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

SIGNATURE_0X800007D NOT FOUND

Link to comment
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
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...