Re: Stay-open applet - problems on quitting
Re: Stay-open applet - problems on quitting
- Subject: Re: Stay-open applet - problems on quitting
- From: Richard Morton <email@hidden>
- Date: Thu, 13 Nov 2003 22:43:17 +1100
On Thursday, November 13, 2003, at 09:53 PM, julifos wrote:
...what I've discovered is that when the app is quit
via Cmd-q, it enters its 'quit' handler immediately, regardless of
whatever else it's doing...
My questions are:
Is this the way it's supposed to work?
Hi, Richard.
Hey jj,
You described the correct behaviour.
That's a shame. ;)
You may take a look to this:
<http://developer.apple.com/documentation/AppleScript/Conceptual/
AppleScript
LangGuide/AppleScript.e9.html>
Good find - thank you! An example of the recently discussed LIFO
behaviour - presumably that which changed in AS 1.9.2 - in action.
The "robust method" may depend on what's going on in your code...
Usually just this:
to getBaseData()
tell application "System Events"
set apn to name of processes
set fpn to name of first process whose frontmost is true
end tell
return {(current date), apn, fpn}
end getBaseData
But it may do other things depending on the result. These can take
enough time to allow a user to quit the app whilst it's happening.
Sometimes.
It would be fine if it actually quit, but it returns to what it was
doing before. I guess there'll be a way of dealing with it...
Thanks & cheers,
iQuit
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.