Opening and modifying a .plist file with System Events
Opening and modifying a .plist file with System Events
- Subject: Opening and modifying a .plist file with System Events
- From: "OSullivan, Steven" <email@hidden>
- Date: Tue, 14 Jul 2009 15:45:50 -0700
- Thread-topic: Opening and modifying a .plist file with System Events
Title: Opening and modifying a .plist file with System Events
Hello all,
I am trying to make a small AppleScript Studio application (using XCode 3.1.2 on OS X 10.5.7) that will open a .plist, display the one string member within the .plist file in a Label text file, and allow the user to click a button that will replace the string member of the .plist with a string that was entered into a text field on the interface. Please note that this is not a question about AppleScript Studio per se, but about how to manipulate .plist files using System Events through AppleScript. Thanks your consideration!
I am trying to learn how to use "System Events" to do this, and am not having any real luck finding documentation on a reliable syntax to open the .plist and read the element into a variable, and then how to take the content of a text field, and overwrite the value in the string element of the .plist file.
If this makes sense, I would appreciate any and all feedback. Below is the structure of the .plist file I have created.
Thanks for any and all assistance!
Regards,
Steve O'Sullivan
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>myString</key>
<string>This is da BOMB!</string>
</dict>
</plist>
_______________________________________________
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