• 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
Opening and modifying a .plist file with System Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Opening and modifying a .plist file with System Events
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Simple apple script - Beginner Problem
  • Next by Date: Re: Opening and modifying a .plist file with System Events
  • Previous by thread: Re: Mail: Message Reference Problem
  • Next by thread: Re: Opening and modifying a .plist file with System Events
  • Index(es):
    • Date
    • Thread