Re: Is: Setting File & Creator Type access error
Re: Is: Setting File & Creator Type access error
- Subject: Re: Is: Setting File & Creator Type access error
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 02 Jul 2009 11:06:15 -0700
- Thread-topic: Is: Setting File & Creator Type access error
Title: Re: Is: Setting File & Creator Type access error
On 7/1/09 9:53 PM, "Philip Aker" <email@hidden> wrote:
On 2009-07-01, at 17:15:03, Paul Berkowitz wrote:
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.
At least, that has been my experience over several years. I have just come
upon replies from others that indicate I may have been leading a sheltered
life, and that this behavior may differ from application to application. if
that is indeed the case, I defer to others' greater knowledge.
Could be, but since the Finder is traditionally and overwhelmingly the application in question:
set f to ((path to desktop folder as text) & "test.txt") as alias
tell application "Finder" to tell (document file f)
set {file type, creator type} to {"DISH", "DHAT"}
end tell
info for f
Aren't you just making my original point, that it has nothing to do with Finder vs. System Events, but rather to do with the necessity of telling the direct object if you want to set a list of its properties all at once? I have hit the same thing with several other applications, in particular Microsoft Entourage. But since I have not tried it with every application, perhaps those who think it's related to the application might come up with one where that matters. Perhaps both conditions matter? Thanks for confirming that it doesn't have anything to do with the Finder vs. System Events.
--
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