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

Re: List to a text representation of that list (revisited)


  • Subject: Re: List to a text representation of that list (revisited)
  • From: kai <email@hidden>
  • Date: Tue, 26 Apr 2005 00:55:38 +0100


On Mon, 25 Apr 2005 15:16:30 -0700, Stan Cleveland wrote:

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?

Jon's Commands?

---
kai

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