Jump to content
Sign in to follow this  

newbie question

Recommended Posts


i would like to know if it's possible to get a error code or some other indication when a recorder can't complete the operation that was recorded.

Example: the .exe file that supposed to be clicked by the recorder has been removed from the desktop.

or input type which now is disabled...


Edited by Yariv

Share this post

Link to post
Share on other sites

Hey Yariv!

well it would be dependent on your code, but generally you can just query the @error macro immediately after the line of code that executes.

For example:

$hFile = FileOpen("C:\Somefile.txt",0)
if @error then msgbox(0,"Error!","There was an error opening the file")

the @error macro works the exact same as %errorlevel% in batch files if you've had any experience coding with them previously.

The alternative is too assign the function to a variable (as i have done in the example with fileopen) and then query against that....
The return codes can all be found in the autoit documentation here

if you still have difficulty, Post your code, and we can have a look at it for you :)


give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...