Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
- Subject: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
- From: Johnny AppleScript <email@hidden>
- Date: Wed, 01 Jul 2009 00:21:49 -0600
- Thread-topic: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
Hi Everyone,
Buddy of mine asked me a question I can't recall the answer to; wondered if
you fine folks could shed some light.
-- Why does this work:
tell application "Finder"
set my_file to choose file
set file type of my_file to "THIS "
set creator type of my_file to "that"
end tell
-- > ³that²
-- And this works:
tell application "Finder"
set my_file to choose file
set {f, c} to {file type, creator type} of my_file
end tell
-- > {³THIS², ³that²}
-- 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.
Nothing serious, but why does it take four lines of code to do what should
be done in one?
Thanks in advance.
JA
_______________________________________________
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