• 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
read a plist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read a plist


  • Subject: read a plist
  • From: KOENIG Yvan <email@hidden>
  • Date: Tue, 15 Jan 2008 21:07:48 +0100

Hello

I have an HFS path to a plist file :
set thePlist to "Macintosh HD:Users:yvankoenig:Library:Preferences:com.apple.iWork.Numbers.plist"


How may I use it to read a value in the plist file?

I tried:

set thePlist to "Macintosh HD:Users:yvankoenig:Library:Preferences:com.apple.iWork.Numbers.plist"
set thePlist to POSIX file thePlist
tell application "System Events"
tell contents of property list file thePlist
{value of property list item "LSDocumentDefaultSaveDirectory"}
end tell
end tell


but it fails.

I checked that if I define


set thePlist to "~/Library/Preferences/com.apple.iWork.Numbers.plist"

It works but how may I convert flawlessly the original path to a usable one ?

Yvan KOENIG
_______________________________________________
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: read a plist
      • From: Christopher Nebel <email@hidden>
    • Re: read a plist
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: "a reference to"
  • Next by Date: Re: read a plist
  • Previous by thread: make new folder ?
  • Next by thread: Re: read a plist
  • Index(es):
    • Date
    • Thread