• 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: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Paul Berkowitz <email@hidden>
  • Date: Wed, 01 Jul 2009 17:08:25 -0700
  • Thread-topic: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file

On 7/1/09 1:53 AM, "Yvan KOENIG" <email@hidden> wrote:

>> 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.


That's not System Events vs. Finder.

It's because your script *tells* the object whereas the first script just
tells the application and tries to set a list or properties 'of' the object.

That's how it works, and always has. You can only set multiple properties -
a list of properties - of an object to a list of values if you tell the
object directly. You can *get* values of a list of properties either way.

--
Paul Berkowitz


 _______________________________________________
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

  • Follow-Ups:
    • Re: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Is: Setting File & Creator Type access error; Was: Re: changing the "open with application" value for a file (From: Yvan KOENIG <email@hidden>)

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