is it possible to run two or more script versions at once?

G’day from Oz.

I’ve got a large script that processes emails automatically, and prints all graphics.

It’s called from a small folder action script attached to the ‘messages’ folder inside a particular mailbox.

Trouble is, it appears that as it’s working, and new mail arrives, the script is re-triggered and seems to ‘overrun’ itself with two or more versions running at once. It’s a real problem.

Is there any way of testing if the script exists or is running to avoid this problem?

Regards

Santa

Turns out it is possible to run overlapping scripts. I had 4 going at once.

What I did was write “running” to a .dat file as soon as the script started, then “stopped” just before it finished.

Then it was simply a matter of reading the variable in the file before calling the script for a second time.

Regards

Santa