Jump to content

"Exit <anything>" always results in %ERRORLEVEL% 0


Recommended Posts

Using AutoIt 3.1.1.0

Either intyerpreted or compiled, I am gettittin 0 as en exit value from any script, regardless of the value given to Exit.

What's wrong?

Simple example, to return the amount of memory in GB as an integer.

$memstats = MemGetStats()

$mem = $memstats[1] / (1024*1024)

$GB = Round($mem, 0) ; should be 1 if memory > 500MB and < 1.5 GB

MsgBox(0,"",$GB)

Exit $GB

Run on a 1 GB system, the MsgBox shows 1, but the value of %ERRORLEVEL% is 0.

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...