• 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
List to a text representation of that list (revisited)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

List to a text representation of that list (revisited)


  • Subject: List to a text representation of that list (revisited)
  • From: Stan Cleveland <email@hidden>
  • Date: Mon, 25 Apr 2005 15:16:30 -0700

Back in mid-March, there was an interesting thread on this list about
converting an AppleScript list or record into a string that represented that
list or record. Since then, I stumbled upon an odd script behavior that may
have some application in the list-to-string arena.

The list or record to be converted must be the first line inside the 'on
run' handler. The 'text 2 thru -1 of' is used simply to strip off the
leading tab character.

on run var
    {name:"blah", parts:{{1, 2}, {stuff:{pi, 1.618, missing value}}}}
    return text 2 thru -1 of paragraph 2 of (var as text)
end run
--> "{name:\"blah\", parts:{{1, 2}, {stuff:{pi, 1.618, missing value}}}}"

I stumbled upon this while experimenting with the idea of passing a
parameter from an 'on open' handler to an 'on run' handler without using
globals or properties. I don't quite understand what's happening here, but
it appears that var contains the whole script as a self-initialized script
object. Any thoughts?

Stan Cleveland
Color Technology Inc.
Portland, Oregon

"I don't have a solution, but I certainly admire the problem."


 _______________________________________________
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: List to a text representation of that list (revisited)
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Finder producing path error
  • Next by Date: Re: Finder producing path error
  • Previous by thread: Re: getting text of clipping
  • Next by thread: Re: List to a text representation of that list (revisited)
  • Index(es):
    • Date
    • Thread