Re: Open/Close Unscriptable Apps?
Re: Open/Close Unscriptable Apps?
- Subject: Re: Open/Close Unscriptable Apps?
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 19 Nov 2001 21:00:07 -0800
On 11/18/01 6:16 PM, "Gnarlodious" <email@hidden> wrote:
>
I want an unscriptable app to quit not saving(bypass all the "Save?"
>
dialogs)
>
and then restart (to update the app's clock).
>
Is this possible? And how? I tried but it didn't work.
>
Can someone post a tiny script showing how to "open application X"?
>
Thanks.
>
The 'open' part is the easy part. Get the alias form, if you need to, by
tell application "Finder"
set theFile to application file id "xxxx" -- an alias
where "xxxx" is the creator code of the app (in OS 9 or earlier), or omit if
you already know the file path, and can do instead (outside the Finder,
usually)
set theFile to alias "HD:A Folder:A file"
then continue _in the Finder tell block_
open theFile
end tell
What may be harder is quitting, although 'quit" usually works even for
unscriptable apps. It won't avoid the dialogs, however.
tell application "Some App" to quit
To quit without dialogs you need an osax. there are various 'kill' osaxen
available at
http://www.osaxen.com, and I seem to remember that Akua may
have a quit-without-saving command too.
--
Paul Berkowitz