List to a text representation of that list (revisited)
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