Re: changing the "open with application" value for a file
Re: changing the "open with application" value for a file
- Subject: Re: changing the "open with application" value for a file
- From: Philip Aker <email@hidden>
- Date: Mon, 25 May 2009 19:25:07 -0700
On 2009-05-25, at 06:30:37, Jim Brandt wrote:
When I tried your script with a file named VideoCast-10.m4v on the
desktop,
I get the following error:
System Events got an error: Can't make default application of disk
item
"OSX:Users:jimbrandt:Desktop:VideoCast-10.m4v" into type reference.
I'm running OS X 10.4.11 on a PowerMac Dual 450 G4
is the default application property a Leopard thing?
Probably.
However I think System Events for 10.4 might have a 'creator type' for
files. Whether or not it works on that system, I can't remember.
QuickTime Player's creator type is 'TVOD'.
The complete script:
set mov to ((path to desktop folder as text) & "VideoCast-10.m4v")
set default_app to (path to application "QuickTime Player") as text
tell application "System Events"
set default application of disk item mov to default_app
-- open mov
end tell
On May 23, 2009, at 3:58 PM, Philip Aker wrote:
set mov to ((path to desktop folder as text) & "CremeBrulez.mov")
set default_app to (path to application "QuickTime Player") as text
tell application "System Events"
set default application of disk item mov to default_app
open mov
end tell
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
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