Jump to content

Recommended Posts

Posted (edited)

Hey,

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...

Thanks!

Edited by Yariv
Posted

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 :)

-Javi

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...