• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Open/Close Unscriptable Apps?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Open/Close Unscriptable Apps?
      • From: Andy Wylie <email@hidden>
References: 
 >Open/Close Unscriptable Apps? (From: Gnarlodious <email@hidden>)

  • Prev by Date: URL Access Scripting and OS X
  • Next by Date: Re: Do Scripters Get Work?
  • Previous by thread: Open/Close Unscriptable Apps?
  • Next by thread: Re: Open/Close Unscriptable Apps?
  • Index(es):
    • Date
    • Thread