Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: background app won't quit.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: background app won't quit.



At 5:51 PM +0000 12/19/05, Andy Huntington wrote:
My problem comes when I want to quit the script. I have to force quit.
It makes my shutdown hang.

Any advice warmly welcomed :-)

			if n = 0 then
				display dialog "The camera is empty."
				eject disk diskname
				return
			end if

"return" only terminates the execution of the current handler - namely, the "idle" handler. I think what you want is "quit" but if you replace your "return" with "quit" you will really be telling Finder to quit, which it will probably do. You've got to slightly amend your script and have a conditional "quit" outside the tell app "Finder" structure.


Something like (pseudo script): if n = 0 then set willQuit to true, else set willQuit to false, with timeout of 600 seconds move the files, end if, end tell, if willQuit then quit.

Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >background app won't quit. (From: Andy Huntington <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.