• 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: Stupid question about setting default app...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stupid question about setting default app...


  • Subject: Re: Stupid question about setting default app...
  • From: Philip Aker <email@hidden>
  • Date: Wed, 30 May 2007 00:38:06 -0700

On 2007-05-29, at 23:57:06, Ruth Bygrave wrote:

Every time I want to create an XML file (I use Satimage's excellent XMLLib) it isn't a plist. How can I avoid Property List Editor?

I tried:
   return info for f
and 

set default application of f to "Macintosh HD:Applications:TextEdit.app"

The words 'default application' are in blue. I made sure f was an alias (actual file). It's inside a Finder tell block.

What's going wrong.


If the kind of file you're creating is not specifically mapped to an application, then normally the Finder will launch it with the default application. So if you are creating files with an ".xml" extension, then select it in the Finder and choose "Get Info" from the Finder's File menu. Then you can assign a specific application to always launch those kinds of files.

If you wish to launch a specific file with a specific application in a portion of a script targeted to the Finder then it's:

set xfile to ((path to desktop as string) & "some.xml") as alias
tell application "Finder"
select xfile
open selection using (path to application "TextEdit")
end tell

PS: There are other ways to do this…

Philip Aker
email@hidden


 _______________________________________________
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: 
 >Stupid question about setting default app... (From: Ruth Bygrave <email@hidden>)

  • Prev by Date: Stupid question about setting default app...
  • Next by Date: InDesign, current view
  • Previous by thread: Stupid question about setting default app...
  • Next by thread: InDesign, current view
  • Index(es):
    • Date
    • Thread