aGorilla Posted May 10, 2008 Posted May 10, 2008 From reading the docs, and searching for examples, I expected the following code to... 1. Set @Error to 1 2. Set @Extended to 2 3. Return False msgbox(262144, '', Dummy()) msgbox(262144, '', @Error) msgbox(262144, '', @Extended) Func Dummy() Return SetError(1, 2, False) EndFunc It returns false, but it's not setting @Error or @Extended. Any suggestions? I'm also wondering if there's some 'standard' for using SetError, but a quick scan of the forums implies that there is not. If there is a standard, I'd love to know. Search AutoItScript.com via Google
Valuater Posted May 10, 2008 Posted May 10, 2008 (edited) This will do the trick... $Info = Dummy() $Info1 = @error $Info2 = @extended MsgBox(262144, '', "Return = " & $Info & @CRLF & "Error = " & $Info1 & @CRLF & "Extended = " & $Info2) Func Dummy() Return SetError(1, 2, False) EndFunc ;==>Dummy the message boxes have their own error reporting/returns 8) Edited May 10, 2008 by Valuater
aGorilla Posted May 10, 2008 Author Posted May 10, 2008 Ok, so it was setting them, but the msgbox was eating them. Good to know. Thanks much Valuater. Search AutoItScript.com via Google
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