read a plist
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