Yariv Posted June 10, 2014 Share Posted June 10, 2014 (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 June 10, 2014 by Yariv Link to comment Share on other sites More sharing options...
javiwhite Posted June 10, 2014 Share Posted June 10, 2014 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. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted June 10, 2014 Share Posted June 10, 2014 (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 June 10, 2014 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Yariv Posted June 10, 2014 Author Share Posted June 10, 2014 Thanks for the quick response. I'll give it a try. Link to comment Share on other sites More sharing options...
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