Jump to content
Sign in to follow this  
cypher175

Whats the code for to do something if a Operation fails..?

Recommended Posts

cypher175

Is there a code for On Fail do Such & Such or on Success Do Such & Such..??

Share this post


Link to post
Share on other sites
Tomb

@error

Share this post


Link to post
Share on other sites
jvanegmond

@error

Even though Tombs reply is correct, it is incomplete.

@error is the macro you can use to check if the previous function failed with its normal execution and set the @error flag. It does not however, what I think you want, indicate when AutoIt has errored out completely.

There's no way to tell in your script when it has crashed, because there is no way to guarantee the safe execution of whatever happens in that supposed "on error" function.

Share this post


Link to post
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
Sign in to follow this  

×