Sign in to follow this  
Followers 0
kevinlaikf

What is the Autoit3 equivalent of BASIC's "ON ERROR"

2 posts in this topic

I had spool a list of 4000+ files into an array.

Running a While loop to parse every file in this array.

Occasionally I would hit the "memory allocation error", which i read here in related topics, is caused by large string length.

Upon hitting this error, my script stopped.

My parsing program would run for hours, and hitting errors would results in loss of time due to absence of intervention in case of error.

I would like to find a solution, in which I would allow to continue the script by moving the questionable file to a temp folder skipping it, and continue with the rest of my files.

Anyone know the AUTOIT3 equivalent of BASIC "ON ERROR "memory allocation error" Move current array file away, and CONTINUE WHILE LOOP...?

Share this post


Link to post
Share on other sites



I had spool a list of 4000+ files into an array.

Running a While loop to parse every file in this array.

Occasionally I would hit the "memory allocation error", which i read here in related topics, is caused by large string length.

Upon hitting this error, my script stopped.

My parsing program would run for hours, and hitting errors would results in loss of time due to absence of intervention in case of error.

I would like to find a solution, in which I would allow to continue the script by moving the questionable file to a temp folder skipping it, and continue with the rest of my files.

Anyone know the AUTOIT3 equivalent of BASIC "ON ERROR "memory allocation error" Move current array file away, and CONTINUE WHILE LOOP...?

Have you identified what it is about the files that causes this? Like if you log the files as you're processing them and so logically the last one logged before it crashed would be the one that crashed it? I don't think AutoIt was intended to just plough on through errors, you'll need to identify what the problem is...

How are you reading in these files? Are you doing a fileopen (followed of course by a fileclose?) or _FileReadToArray, or FileRead? Are you just running into some massive files that you could just check for the filesize and weed them out? And can we get an example of what your script looks like? Details man, details!

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