• 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: getting a list of labels from a record?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting a list of labels from a record?


  • Subject: Re: getting a list of labels from a record?
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 03 Jun 2013 09:00:00 -0500

On Jun 3, 2013, at 7:25 AM, Alex Hall wrote:

I didn't realize Applescript had native plist support, that should prove useful. I have things working as I want them to by using a list of tuples, but plists might be handy for other settings in this set of scripts.

It might be helpful to understand exactly what AppleScript's plist support is.

1. You can read the contents of a plist file into a record like this

tell application "System Events" to set prefsRec to (value of property list file (prefsFile as text)) 

where prefsFile is an alias to a plist file.

2. You can modify the record prefsRec as you like using native AppleScript.
(But you will have to know the names or labels of the record keys.)

3. You can write the record prefsRec back to the plist file with

tell application "System Events" to set value of property list file (prefsFile as text) to prefsRec 

overwriting the former contents.

You can also read-modify-write a single key within the plist file.



 _______________________________________________
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: 
 >Re: getting a list of labels from a record? (From: Emmanuel LEVY <email@hidden>)
 >Re: getting a list of labels from a record? (From: Alex Hall <email@hidden>)

  • Prev by Date: Re: getting a list of labels from a record?
  • Next by Date: Re: getting a list of labels from a record?
  • Previous by thread: Re: getting a list of labels from a record?
  • Next by thread: Re: getting a list of labels from a record?
  • Index(es):
    • Date
    • Thread