Re: list to a text representation of that list
Re: list to a text representation of that list
- Subject: Re: list to a text representation of that list
- From: yvan-koenig <email@hidden>
- Date: Wed, 16 Mar 2005 12:36:09 +0100
Le 16 mars 2005 , à 11:55, jj a écrit :
Sure! I'll modify it. Thanks!
I did it:
whateverToText({1, "a", {x:2}}) --> "{1, \"a\", {x:2}}"
on whateverToText(x)
try
if class of x is in {string, Unicode text} then
try
count x
return x
on error msg --> handle data string/utxt
return text 1 thru -39 of msg
end try
else
tell application x to beep
end if
on error msg
set AppleScript's text item delimiters to "application"
set laListe to (text items of msg)
set AppleScript's text item delimiters to ""
set msg to text 2 thru -2 of laListe's item 2
if msg starts with "(" and msg ends with ")" then --> unknown object
beep 2
return text 2 thru -2 of msg
else
return msg
end if
end try
end whateverToText
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