Jump to content
Sign in to follow this  
Aces

ErrorChecking

Recommended Posts

Aces

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

Share this post


Link to post
Share on other sites
Generator

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)

TrayIconDebug

Share this post


Link to post
Share on other sites
Aces

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

Share this post


Link to post
Share on other sites
Aces

no one knows?


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

Share this post


Link to post
Share on other sites
enaiman

Try in SciTE to use Tools/Trace: Add trace lines

This way you can see exactly what your script is doing (tracing execution)


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
PsaltyDS

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.