Re: setting default app for document
Re: setting default app for document
- Subject: Re: setting default app for document
- From: yvan-koenig <email@hidden>
- Date: Mon, 7 Mar 2005 22:21:15 +0100
Le 6 mars 2005 , à 21:40, kai a écrit :
On Sun, 6 Mar 2005 09:55:50 -0500, Glenn Kowalski wrote:
I searched the archives for this but came up with a blank. Is there a
way to set the default application for a document? I've tried
tell app Finder
set default application of "blah blah blah document path" to "blah
blah blah application path"
end tell
---------------
set f to choose file with prompt "Please choose a file to convert:"
set a to choose application with prompt "Choose a default application:"
tell application "Finder"
set f's creator type to (path to a)'s creator type
open f
end tell
---------------
If I remember well, your script grabbing the application open the app
itself , and returns a UNICODE string which is not the correct format
to set a creator type (Text required)
perhaps this one may help
tell application "Finder"
set f to choose file with prompt "Please choose a file to convert:"
set theFile to choose file with prompt "Choose a default application:"
set theTrueFile to "" & theFile & ":Contents:PkgInfo" (* build the
complete path *)
set ct to read (theTrueFile as alias)
set creatortype to text 5 thru -1 of ct
set f's creator type to creatortype
end tell
Yvan KOENIG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden