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: yvan-koenig <email@hidden>
- Date: Wed, 16 Mar 2005 22:13:16 +0100
Le 16 mars 2005 , à 21:20, Michelle Steiner a écrit :
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
Why not:
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
Yvan KOENIG
_______________________________________________
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