Kill all won't work


I’ve got a very long AppleScript application that I’m having trouble quitting correctly.

I’ve got a quit handle with a ‘continue quit’ command, but it ‘recycles’ at least half a dozen times, and then sometimes doesn’t quit at all.

I’ve tried using a shell script ‘kill all’, but it doesn’t work either.

ATM I’ve resorted to running an external app that uses the ‘killall’ command to kill the main app, but Is there a way to run the ‘kill all’ from the main script itself?



Ps sent from my iPad, so kill all has a space inserted.

So you have…

on run
end run

on quit
	--blah blah blah code
	continue quit --this is what your talking about
end quit

…and continue quit doesn’t work?
Maybe you should make sure your script is OK… because if you have to use “killall” to stop your application, it might be TOO heavy. Can you post the code, or do you want it secret?

I have never used the continue quit statement in one of my codes. What happens if you leave it out?

Well continue command won’t be executed or one of the parent’s of this handler also contains a quit handler as well. It must be one of these two faults in you application. When I make a new application in script editor it works like a charm.

You must end your code in the quit handler with continue quit. The reason of continue is that it will go up the parent chain and eventually will give the top level of your app the command to quit. The continue has nothing to with ‘continuing the quit handler’ or something but only tells the parent to quit and if the parent has no quit handler it will tell the parent of that parent to quit till it eventually tells the application to quit. It will also give one of the parents a chance to do some coding as well before quitting. Also this parent must contain a continue quit as well at the end of his quit handler.

I’m sorry, you’re right, I looked back in my scripts, and I do use continue quit. I should have checked my thoughts before answering to this post.

G’day all

I can’t post the code cause I’m using my iPad whilst on holiday (at a sunny Oz beach). However, I don’t have a quit handler in the script that calls my app, so that might be the problem.

Thanks for the feedback!