Jump to content
Sign in to follow this  
Rex

How to handle autoit crash

Recommended Posts

Rex

Hi there

Is there someway for me to make this Posted Image

to show my own msg ? some how, i only want one msg for all errors i not already have an error handle on.

And now where the runerrorsfatal is removed i don't know how to either remove or change the error msg.

And i can't calc for all errors that would apera if user removes/changes some critical info from my ini file

Cheers

/Rex

Share this post


Link to post
Share on other sites
Fire

I know only one way.Editing your output.exe`s this sections with Reshacker.


[size="5"] [/size]

Share this post


Link to post
Share on other sites
MHz

If runerrorsfatal still existed, then that would not help you with that error as it is because your script is trying to use an array element/subscript that does not exist (also known as out of bounds, or as the error Messagebox says).

The Ubound() function exists so that your script can use it to determine the size of the array so that your code knows the bounds. Your array handling code is incorrect so you get this error message showing. You need to fix the array handling to stop your script from crashing.

I do not understand why you cannot handle the information within the ini file from the string/error handling in your script. Perhaps it is like your array code as being inadequate with the handling of it. So fix it so it does handle the information correct and no more problems.

Look in the help file for "Command Line Parameters" and the usage of "/ErrorStdOut" and that may allow your script to crash with no visual error warning.

Share this post


Link to post
Share on other sites
Rex

I know only one way.Editing your output.exe`s this sections with Reshacker.

I think that it would over killing it :mellow:

Cheers

/Rex

Share this post


Link to post
Share on other sites
Rex

If runerrorsfatal still existed, then that would not help you with that error as it is because your script is trying to use an array element/subscript that does not exist (also known as out of bounds, or as the error Messagebox says).

The Ubound() function exists so that your script can use it to determine the size of the array so that your code knows the bounds. Your array handling code is incorrect so you get this error message showing. You need to fix the array handling to stop your script from crashing.

I do not understand why you cannot handle the information within the ini file from the string/error handling in your script. Perhaps it is like your array code as being inadequate with the handling of it. So fix it so it does handle the information correct and no more problems.

Look in the help file for "Command Line Parameters" and the usage of "/ErrorStdOut" and that may allow your script to crash with no visual error warning.

Hi

I have error controle on my arrays, but only "if @error then msg something"

What i'm trying to prevent is my script crasing if the user deletes something in my ini file, and yes i know to user stupidy theres no way telling.....

Cheers

/Rex

Share this post


Link to post
Share on other sites
water

The best cure against user stupidy is error checking and error checking and ...

If your script crashes because a user deleted a key from the ini file then do the iniread and then check for complete and correct keys and data.

Good programming style is to check for (as much as possible) user errors so you don't have to copy with error messages like the one you showed.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Alek

I usally use

if ubound($Array) < $Expected_Array_Size then

    ;Handle array error

endif

PS:

"Line 12734"

Holy crap!!!!


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites
Rex

I usally use

if ubound($Array) < $Expected_Array_Size then

    ;Handle array error

endif

PS:

"Line 12734"

Holy crap!!!!

Could be that i should do the ubound thing on my arrays, but damn that will take forever :mellow: i use lots of arrays in my prog.

"Line 12734" is that a lot? Last i checked my code was > 8800 lines, including comments, prog/func descriptions and a few #cs / #ce :( and that only my own code then there is all the includes i use :lol:

Cheers

/Rex

Share this post


Link to post
Share on other sites
Rex

The best cure against user stupidy is error checking and error checking and ...

If your script crashes because a user deleted a key from the ini file then do the iniread and then check for complete and correct keys and data.

Good programming style is to check for (as much as possible) user errors so you don't have to copy with error messages like the one you showed.

U'r right, i just think that i'm too lazy to do'it when i write my code the first time :mellow: course checking all my inputs (from ini files) would i think add > 200-300 lines of extra code to my script :(

Cheers

/Rex

Share this post


Link to post
Share on other sites
Juvigy

You could add error handlers.Check in the help file.Also you can check the INI file before using it as suggested above.

Using Reshacker is not needed.Also dangerous if not experienced.

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  

×