Re: How to set application which opens a file via Applescript?
Re: How to set application which opens a file via Applescript?
- Subject: Re: How to set application which opens a file via Applescript?
- From: "S. J. Cunningham" <email@hidden>
- Date: Sun, 30 Aug 2015 07:04:33 -0400
On Aug 30, 2015, at 6:52 AM, Yvan KOENIG wrote:
>
>> Le 2015/08/30 à 12:36, S. J. Cunningham <email@hidden> a écrit :
>>
>> You can change the application which opens a file via "Get Info" but how can you do it via Applescript?
>>
>> Changing the "file type", "file creator," and "original item" properties via a finder script doesn't do it. I notice that when you change it using "Get Info" the "kind" property changes but that property is "read only" to the finder script.
>>
>> Steve
>
> I'm not sure that I understand well your question.
> Maybe this may help :
>
> set aFile to (path to desktop as text) & "erreur Numbers.rtf"
>
> set path2app to path to application id "com.barebones.textwrangler"
> tell application "Finder" to open file aFile using path2app
>
> It opens the text file in TextWrangler. Replace the id by the BBEdit one to achieve your goal.
Sorry I wasn't clear. Using your example, I want to permanently change the application which opens "erreur Numbers.rtf" to textwrangler when I double-click on it from the finder. I don't want to open "erreur Numbers.rtf" via a script.
I can change this via "Get Info" from the finder but I would like to change it via a script.
Hope that's more clear :)
Steve
_______________________________________________
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