SandyTipper Posted January 10, 2006 Share Posted January 10, 2006 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 More sharing options...
Thatsgreat2345 Posted January 10, 2006 Share Posted January 10, 2006 (edited) uh one quick question what is the Exit $gb for? do u just enjoying putting a variable at the end for no reason Edited January 10, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
SandyTipper Posted January 10, 2006 Author Share Posted January 10, 2006 Ah, didn' "get" the start /wait necessity. Alreadly figured out how to get text: for /f %x in ('somescript.exe') do set VAR=%x same idea, THANKS!!! (oh, thatsgreat, that's how to return a numeric value in errorlevel) Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 10, 2006 Share Posted January 10, 2006 o lol gotcha i havent worked with arrays alot either and error levels so yeah Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now