• 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
Best way to get at these text elements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best way to get at these text elements


  • Subject: Best way to get at these text elements
  • From: Jaime Magiera <email@hidden>
  • Date: Sun, 1 Oct 2006 09:23:57 -0400

Hi,

I'm working on a project that requires parsing a .plist file with plain vanilla AS. Though I've written a parser for server configuration files before, my knowledge of AS techniques is limited. Below is the text to parse...

"(
    {
        baseURL = \"http://adomain.com\"; 
        displayName = \"Adomain\"; 
        host = \"www.adomain.com\"; 
        protocol = \".mac\"; 
        remotePath = \"/Sites/podcast\"; 
        serverUniqueID = 1158377199.667244; 
        username = jmagiera; 
    }, 
    {
        baseURL = \"http://www.adomain2.com\"; 
        displayName = Adomain2; 
        host = \"idisk.mac.com\"; 
        protocol = \".mac\"; 
        remotePath = \"/Sites/podcast\"; 
        serverUniqueID = 1158373459.790697; 
        username = jmagiera; 
    }
)"


The quoted array () could have any number of elements, which are also arrays, {}. I was thinking of doing this line by line, but it would be easier to break it up with text item delimiters. On the other hand, sending it to the command line via do shell script and running it through something else might work. 

Anyone have suggestions for how to approach this? Thanks.

Jaime
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Best way to get at these text elements
      • From: kai <email@hidden>
    • Re: Best way to get at these text elements
      • From: Philip Aker <email@hidden>
  • Next by Date: Re: ACROBAT 7: Scripting Default Font Size for Text Annotations
  • Next by thread: Re: Best way to get at these text elements
  • Index(es):
    • Date
    • Thread