Hack Forums
Execute command with return code! - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: Execute command with return code! (/showthread.php?tid=3812789)



Execute command with return code! - Unc3nZureD - Oct 18, 2013

I just found a very simple, but awesome function :)

Many people are using the Execute() command, however it doesn't give any return code. Using my little script you can use the execute with the knowledge of the real return.

here it is:

Code
Func Exec($command)
    Local $return
    Execute(Assign("return", $command, 1))
    Return $return
EndFunc