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: David C Andrews <email@hidden>
- Date: Wed, 16 Mar 2005 23:03:41 -0500
On Mar 16, 2005, at 4:27 PM, Michelle Steiner wrote:
On Mar 16, 2005, at 2:13 PM, yvan-koenig wrote:
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 offset of "}" in "" & (reverse of (characters of msg))
set list_string to text opening through -closing of msg
end try
That's what I was going to try originally, but the phone rang, and I lost my train of thought. When I got back to the problem, it had completely escaped me. Yet another sign of my approaching old age. <sigh>
So, why doesn't this work?
OMM it goes -->
"{{1, 2, 3}, \"abc\", 3.14159265359, {\"foo\","
on try1() -- (if you got an English language Mac)
try
{{1, 2, 3}, "abc", pi, {"foo", 3, "bar"}, "z"} as integer
on error msg
text 12 thru -17 of msg
end try
end try1
my try1() --> "{{1, 2, 3}, \"abc\", 3.14159265359, {\"foo\", 3, \"bar\"}, \"z\"}"
on try2() -- (your universal language code)
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 offset of "}" in "" & (reverse of (characters of msg))
set list_string to text opening through -closing of msg
end try
end try2
try2() --> "{{1, 2, 3}, \"abc\", 3.14159265359, {\"foo\","
David A
_______________________________________________
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