• 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: Snow Leopard default app setter - why does it open the app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Snow Leopard default app setter - why does it open the app?


  • Subject: Re: Snow Leopard default app setter - why does it open the app?
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 24 Sep 2009 12:55:38 -0700

On Sep 24, 2009, at 10:53 AM, Laine Lee wrote:

I pieced this together as an example of a droplet that can easily be
modified to work as an Automator Service to allow selection of a file's
intended default application from a list.


Why does it always launch the targeted application?

   ...
   set target_app to (path to (application id theValue))

The problem is the "path to". "verb application" is semantically equivalent to "tell application to verb", which means it's going to send the "path to" command to that application, which is going to need to launch in order to handle it. Use Finder's "application file" class instead:


tell application "Finder" to get application file id "com.apple.textedit" as text
--> "Macintosh HD:Applications:TextEdit.app"



--Chris Nebel AppleScript Engineering

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Snow Leopard default app setter - why does it open the app? (From: Laine Lee <email@hidden>)

  • Prev by Date: Re: Open folders in new window
  • Next by Date: Disappearing Mail Trash
  • Previous by thread: Snow Leopard default app setter - why does it open the app?
  • Next by thread: Disappearing Mail Trash
  • Index(es):
    • Date
    • Thread