Re: list to a text representation of that list (followup)
Re: list to a text representation of that list (followup)
- Subject: Re: list to a text representation of that list (followup)
- From: Michelle Steiner <email@hidden>
- Date: Wed, 16 Mar 2005 13:20:32 -0700
On Mar 16, 2005, at 12:11 PM, J.C.Burns wrote:
Thanks Michelle and J.J. and Gnarlodious...very useful ideas for a
function that I'm surprised is not a part of Applescript itself (I
spent an hour looking through Matt Neuberg's book yesterday before I
asked the question...and I was sure I was just missing some essential
command/property.)
I just thought of another way.
try
{{1, 2, 3}, "abc", pi, {"foo", 3, "bar"}, "z"} as integer
on error msg
set opening to offset of "{" in msg
set closing to my find_closing(msg)
set list_string to text opening through closing of msg
end try
on find_closing(msg)
repeat with i from length of msg to 1 by -1
if character i of msg is "}" then return i
end repeat
end find_closing
--> {{1, 2, 3}, \"abc\", 3.14159265359, {\"foo\", 3, \"bar\"}, \"z\"}"
--
"As democracy is perfected, the office of president represents, more
and more closely, the inner soul of the people. On some great and
glorious day the plain folks of the land will reach their heart's
desire at last and the White House will be adorned by a downright
moron."
.... H.L. Mencken ...
_______________________________________________
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