• 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
Re: Lists and writing to file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lists and writing to file


  • Subject: Re: Lists and writing to file
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 3 Sep 2009 18:39:55 -0700

On Sep 3, 2009, at 2:25 PM, Peter Baxter wrote:

I solved my problems with the lists through judicious use of

ignoring white space and punctuation

However when I write to file the result looks like this:
list\utxt
utxtADA,utxt SCI7B,utxt SCI7G,utxtSCF10B,utxt CH022,utxt CH034,utxt
utxtAND,utxt
IP7B,utxt DRA7G,utxt DRA7O,utxt
IP8B,utxt ART8O,utxt ART8R,utxt ART9B,utxt 909SD,utxt 909CD,utxt
COMP,utxt
utxtBAP,utxt MUS7B,utxt MUS8B,utxt MUS8G,utxt MUS9A,utxt SMU10,utxt MC012,utxt MC034,utxt
utxt


instead of this:

ADA,SCI7B,SCI7G,SCF10B,CH022,CH034,
AND,IP7B,DRA7G,DRA7O,IP8B,ART8O,ART8R,ART9B,909SD,909CD,COMP,
BAP,MUS7B,MUS8B,MUS8G,MUS9A,SMU10,MC012,MC034,

as it appears in the result window. What is going on with the "utxt" stuff?

Writing an AppleScript list to a file writes a binary representation of the list, such that you could read it back and get the exact same list value. What you want to write is really a textual representation of the list, so you should create that text (such as by using text item delimiters with "as text", as shown before) and then write that to the file.



--Chris Nebel AppleScript Engineering

_______________________________________________
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: Lists and writing to file
      • From: Peter Baxter <email@hidden>
References: 
 >Lists and writing to file (From: Peter Baxter <email@hidden>)

  • Prev by Date: make with properties
  • Next by Date: iCal Script Not Working in 10.6
  • Previous by thread: Lists and writing to file
  • Next by thread: Re: Lists and writing to file
  • Index(es):
    • Date
    • Thread