• 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: names of a record's items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: names of a record's items


  • Subject: Re: names of a record's items
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 09 Apr 2014 10:38:30 -0500

On Apr 9, 2014, at 9:13 AM, 2551 wrote:

Way back when Matt Neuburg wrote AppleScript: The Definitive Guide, he stated that:
“There is no built-in way to obtain a list of the names of the items of a record…I have seen many elaborate 

The "System Events" dictionary contains the "Property List Suite" which looks tantalizing close to doing this.
I experimented with this for awhile ...

on run
set plistInfo to (do shell script "diskutil info -plist " & "OS_X")
-- plistInfo is class text in xml format
tell application "System Events"
set infoRecord to value of (make property list item with properties {text:plistInfo})
-- infoRecord is class record
end tell
--
tell application "System Events"
-- some property list item of infoRecord -- Error: Can't get some property list item of ...
-- some property list item of plistInfo -- returns a text character
end tell
end run

Either I'm not reading the dictionary correctly or it's broken.
I found no way to use the Property List Suite to get the name of a record item.
Still, the dictionary looks like I ought to be able to do this.
If I 'log' the infoRecord , I can see the names and values that I want in the Console window. ^%$#@!



 _______________________________________________
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: names of a record's items
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: names of a record's items
  • Next by Date: Re: names of a record's items
  • Previous by thread: Re: names of a record's items
  • Next by thread: Re: names of a record's items
  • Index(es):
    • Date
    • Thread