Re: Stupid question about setting default app...
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