Re: Simplest script fails
Re: Simplest script fails
- Subject: Re: Simplest script fails
- From: Chris Page <email@hidden>
- Date: Wed, 9 Jul 2003 09:37:19 -0700
On Wednesday, Jul 9, 2003, at 08:39 US/Pacific, Thomas England wrote:
I have a simple script to quit one program...
What puzzles me is that sometimes it works, sometimes it doesn't. When
it fails I get a dialog box saying "Connection is invalid"...
tell application "Digest Viewer" to quit
When you tell an app to Quit, it usually quits without sending back a
reply to the event. Normally, AppleScript waits for a reply to every
event. If the application it's waiting on goes away without replying,
AppleScript returns an error about the connection being lost. What's
surprising is that this doesn't produce an error every time.
In any case, the solution is to tell AppleScript to not expect a reply:
ignoring application responses
tell application "Digest Viewer" to quit
end
--
Chris Page - Software Wrangler - Palm, Inc.
That's "Chris" with a silent *and* invisible "3".
_______________________________________________
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.