• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting File & Creator Type access error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting File & Creator Type access error


  • Subject: Re: Setting File & Creator Type access error
  • From: Philip Aker <email@hidden>
  • Date: Wed, 1 Jul 2009 01:15:15 -0700

On 2009-06-30, at 23:21:49, Johnny AppleScript wrote:

-- Why does this work:

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.

I don't know but:

tell application "System Events"
set {creator type of my_file, file type of my_file} to {"THAT", "THIS"}
end tell

runs without reporting an error on my 10.5.7/Intel setup.


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

  • Next by Date: Re: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
  • Next by thread: Re: Setting File & Creator Type access error
  • Index(es):
    • Date
    • Thread