• 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
Why won't this parse?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why won't this parse?


  • Subject: Why won't this parse?
  • From: David Graham <email@hidden>
  • Date: Thu, 10 May 2001 09:01:23 -0700

I am trying to parse a Eudora nickname file to make a list of aliases. I wish I could just get this directly from Eudora through AS but it's not reliable since you can't get a recently added nickname by index ... did that make sense? Anway, I figured I'd just read the nickname file directly and parse out the information that I need, but I'm getting a strange error.

Here's the script (summary):

property theData : "alias PWI_AAA email@hidden
alias PWI_BBB email@hidden
alias PWI_CCC email@hidden
note PWI_AAA All San Diego Employees
note PWI_BBB All San Bernardino Employees
note PWI_CCC All South Bay Employees
"

set aliasList to {}
-- parse the nickname file
set nickFileEntries to paragraphs of theData as list
-- parse each entry and make a list of the aliases
repeat with thisEntry in nickFileEntries
set thisEntry to thisEntry as text
-- parse string into three parts (we only need the first two)
set AppleScript's text item delimiters to ASCII number 32 -- space
-- grab the first two values of the string
set strType to text item 1 of thisEntry
set strNickName to text item 2 of thisEntry
set AppleScript's text item delimiters to {""}
-- make a list of aliases
if strType is "alias" then set aliasList to aliasList & strNickName
end repeat

return aliasList

No matter how I try it I get an error when attempting to reference the second text item. I even tried coercing it to a list but couldn't get the second item of the list either. What the heck is going on here?

- Dave
--


:: dmgraham information solutions ... database, web & more ::

david m graham
10353 san diego mission rd., #107c, san diego, ca 92108
619.322.9698
http://www.dmgraham.n3.net


  • Follow-Ups:
    • Re: Why won't this parse?
      • From: John W Baxter <email@hidden>
    • Re: Why won't this parse?
      • From: Bill Briggs <email@hidden>
    • Re: Why won't this parse?
      • From: Jim Schram <email@hidden>
    • Re: Why won't this parse?
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Rogue list?
  • Next by Date: Re: Another Eudora question
  • Previous by thread: Re: CMYK in QuarkXpress
  • Next by thread: Re: Why won't this parse?
  • Index(es):
    • Date
    • Thread