• 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: records and property records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: records and property records


  • Subject: Re: records and property records
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 08 Apr 2010 11:02:55 -0500

On Apr 8, 2010, at 9:26 AM, Yvan KOENIG wrote:

I guess that it's linked to the class of the properties 's names.
Here I pasted the record grabbed by the
set propRec to (system info) -- from StandardAdditions
instruction. I just changed some values in this message

Very interesting. I tried the following:
First, this ...

set itemAlias to alias "OS_X:Users:lutherfuller:Desktop:untitled" -- for example
tell application "Finder"
set propRec to properties of item itemAlias
log propRec
end tell

Then, I copied from Smile's console into a script, twice, getting ...

{class:«class docf», name:"untitled", index:60, displayed name:"untitled", name extension:"", extension hidden:false, «class ctnr»:«class cfol» "Desktop" of «class cfol» "lutherfuller" of «class cfol» "Users" of «class sdsk», «class cdis»:«class sdsk», «class posn»:{-1, -1}, «class dpos»:{1286, 784}, bounds:{-33, -33, 31, 31}, kind:"script document", «class labi»:0, locked:false, «class dscr»:missing value, «class comt»:"", size:4316, «class phys»:8192, creation date:date "Thursday, March 25, 2010 5:19:46 PM", modification date:date "Thursday, March 25, 2010 5:55:01 PM", «class iimg»:missing value, URL:"file://localhost/Users/lutherfuller/Desktop/untitled", «class sown»:"lutherfuller", «class sgrp»:"wheel", «class ownr»:«constant ****rdwr», «class gppr»:«constant ****read», «class gstp»:«constant ****read», file type:"osas", creator type:"VIZF", «class pspd»:false, «class ver2»:"", version:""}

tell application "Finder"
{class:document file, name:"untitled", index:60, displayed name:"untitled", name extension:"", extension hidden:false, container:folder "Desktop" of folder "lutherfuller" of folder "Users" of startup disk, disk:startup disk, position:{-1, -1}, desktop position:{1286, 784}, bounds:{-33, -33, 31, 31}, kind:"script document", label index:0, locked:false, description:missing value, comment:"", size:4316, physical size:8192, creation date:date "Thursday, March 25, 2010 5:19:46 PM", modification date:date "Thursday, March 25, 2010 5:55:01 PM", icon:missing value, URL:"file://localhost/Users/lutherfuller/Desktop/untitled", owner:"lutherfuller", group:"wheel", owner privileges:read write, group privileges:read only, everyones privileges:read only, file type:"osas", creator type:"VIZF", stationery:false, product version:"", version:""}
end tell

Notice the difference. It seems that only the Finder knows how to understand the names and values in the record. Outside a 'tell application "Finder" ' block, the record is meaningless. For example ...

log (position of testRec)

works properly within the block, but errors if outside the block.

It seems that a 'property record' "belongs to" a particular application and is not understandable in another application or AppleScript.

 _______________________________________________
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

References: 
 >records and property records (From: Luther Fuller <email@hidden>)
 >Re: records and property records (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Passed test but Script Editor fails was Re: Spurious Apple Event Timeout Fixed in 10.6.3?
  • Next by Date: Re: Index a given folder
  • Previous by thread: Re: records and property records
  • Next by thread: Re: records and property records
  • Index(es):
    • Date
    • Thread