On May 2, 2013, at 7:05 AM, Jörgen Stahle wrote: on idle -- huge code mass end idle
on quit my doCleanUps() -- clean up ssteps do shell script "kill " & my gAppID end quit
I was curious, so I did a little experiment. I saved this as a stay-open script ...
on idle beep return 1 end idle
on quit display dialog "Quit Beeping?" end quit
When I run it, its icon appears in the Dock, allowing me to select Quit from the application's Dock menu. This causes the "Quit Beeping?" dialog to appear, from which I select "OK". But … the application continues to run.
I added one line of code ...
on idle beep return 1 end idle
on quit display dialog "Quit Beeping?" continue quit end quit
and this script DOES Quit after the dialog. Try using 'continue quit' instead of 'do shell script "kill " & my gAppID'.
|