Sign in to follow this  
Followers 0
Yariv

newbie question

4 posts in this topic

#1 ·  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

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

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Well I guess you could use the FileExists function, and click or not depending on what it returns. You could use the ControlCommand function to see if a certain control is enabled or disabled.

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Thanks for the quick response.

I'll give it a try.

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  
Followers 0