• 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: Finder open ... using...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder open ... using...


  • Subject: Re: Finder open ... using...
  • From: "J. Stewart" <email@hidden>
  • Date: Thu, 28 Dec 2006 08:07:29 -0500

On 12/28/06 at +0100 Tomas Larsson said this

>Hi!
>
>I have a problem with open ... using ... when scripting the Finder.
>I have created a folder action that opens the files that are added to
>the folder in a certain application
>
>This is what I've got:
>
>on adding folder items to this_folder after receiving these_items
>	set the_application to choose application as alias
>	tell application "Finder"
>		open these_items using the_application
>	end tell
>end adding folder items to
>
>This works fine, but I want to open the files in a specific
>application, called Simpletag.
>Is there a way of doing that without knowing the exact path to where
>Simpletag is installed?


Using TextEdit since I don't have Simpletag:

set f to choose file of type "TEXT"
tell application "Finder"
	set a to application file id "com.apple.TextEdit"
	open f using a
end tell

It uses the CFbundleIdentifier from the TextEdit's info.plist inside the application's package. It seems to work just as well with the app's CFBundleSignature ("ttxt") or Creator type (also "ttxt") if available.

JBS
--
An elephant is a mouse built to government specifications.
 _______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Finder open ... using...
      • From: Tomas Larsson <email@hidden>
References: 
 >Finder open ... using... (From: Tomas Larsson <email@hidden>)

  • Prev by Date: Re: Finder open ... using...
  • Next by Date: Re: Finder open ... using...
  • Previous by thread: Re: Finder open ... using...
  • Next by thread: Re: Finder open ... using...
  • Index(es):
    • Date
    • Thread