Jump to content

ErrorChecking


Recommended Posts

Can someone please tell me how to apply ErrorChecking to a script of mine?

(so that if the Func() messes up say for example on username/password login, it pops a messagebox up and ends script)

~~ AutoIt v3 Minion ~~Name: Kevin "Aces-X" MorrisOrganization: A C DevelopmentE-Mail: AcesX91@acecoding.netOS: XP Professional; Vista package~~ Released Software ~~CPU-Mach: Topic at acecoding.net ForumsProxyzBuddy: Beta testing at the moment, private onlyWHSTool: Not released to the public

Link to comment
Share on other sites

thanks, but i think its a little more advanced than that, i'm using a lot of pixel functions because the game im scripting for has no window text, only graphic.

EDIT: the script does not end if there is an error, because there is no text/response information to use an If command for that.

Edited by Aces

~~ AutoIt v3 Minion ~~Name: Kevin "Aces-X" MorrisOrganization: A C DevelopmentE-Mail: AcesX91@acecoding.netOS: XP Professional; Vista package~~ Released Software ~~CPU-Mach: Topic at acecoding.net ForumsProxyzBuddy: Beta testing at the moment, private onlyWHSTool: Not released to the public

Link to comment
Share on other sites

Can someone please tell me how to apply ErrorChecking to a script of mine?

(so that if the Func() messes up say for example on username/password login, it pops a messagebox up and ends script)

I gather you do not mean debugging the script, but rather testing for successful operations during the end use of the script. Most functions use return codes or set @error on problems. Check the help file for the commands you are using. If you want more info on error handling, you'll have to be more specific on what commands you are using. There are a half dozen common techniques depending on the type of command you want to handle errors for. The best one to use depends on the specifics of the function. What command uses the username/password? Is it a Run(), or ObjGet()?

You can't get help if you can't say (or better, show) what you're doing.

:rolleyes:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

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