Re: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
Re: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
- Subject: Re: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 1 Jul 2009 10:53:34 +0200
Le 1 juil. 2009 à 08:21, Johnny AppleScript a écrit :
Hi Everyone,
-- And this does not:
set my_file to choose file
tell application "Finder" to set {file type, creator type} of
my_file to
{"THIS ", "that"}
-- > Can’t set {file type of alias \"[filepath]", «class fcrt» of
alias
\"[filepath]\"} to {\"THIS\", \"that\"}. Access not allowed.
-- Nor does this:
tell application "Finder" to set my_file to choose file
tell application "Finder" to set {file type, creator type} of
my_file to
{"THIS ", "that"}
-- > Can’t set {file type of alias \"[filepath]", «class fcrt» of
alias
\"[filepath]\"} to {\"THIS \", \"that\"}. Access not allowed.
Under 10.4.11, System Events is more fair than Finder !
set my_file to "Macintosh HD:Users:yvan_koenig:Desktop:TheSettings -
copie.txt"
tell application "System Events" to tell (disk item my_file)
set {file type, creator type} to {"THIS ", "that"}
end tell
behaves flawlessly.
Yvan KOENIG (from FRANCE mercredi 1 juillet 2009 10:53:06)
_______________________________________________
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