I have an application that was made with applescript for now I can substitute this for the code:
try
tell application "System Events"
delay 10
display dialog "blah blah"
end tell
end try
and I would like the user to be able to quit this application by either rick clicking on it and selecting "Quit" or by going to File>Quit. But I believe the try is catching the quit. Is there any way to do this?
You can't do what you ask. Even if possible, the delay statement stops everything for 10 seconds so it can't catch any "quit" actions. If you explain a little more about what you're trying to do then there may be another way to accomplish your goal.
Note also that in Yosemite the delay command isn't working properly. It's a bug. You can use this instead until the bug is fixed.