• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: list to a text representation of that list (followup)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Thu, 17 Mar 2005 08:09:53 +0100


Le 17 mars 2005 , à 5:03, David C Andrews a écrit :

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>

Don't bother Michelle, I am 61 years old since december 31 !!

So, why doesn't this work?


You got a shorten string because you passed a shorten list ;-))

on a french system for instance,

msg is:
(*
"Impossible de désigner {{1, 2, 3}, \"abc\", 3.14159265359, {\"foo\", 3, \"bar\"}, \"z\"} comme integer."
so opening is 24 and closing is 16 and the net result is:
"
{{1, 2, 3}, \"abc\", 3.14159265359, {\"foo\", 3, \"bar\"}, \"z\"}"

You got a shorten string because it seems that you passed a shorten list ;-))


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\","

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

  • Follow-Ups:
    • Re: list to a text representation of that list (followup)
      • From: Michelle Steiner <email@hidden>
References: 
 >list to a text representation of that list (followup) (From: "J.C.Burns" <email@hidden>)
 >Re: list to a text representation of that list (followup) (From: Michelle Steiner <email@hidden>)
 >Re: list to a text representation of that list (followup) (From: yvan-koenig <email@hidden>)
 >Re: list to a text representation of that list (followup) (From: Michelle Steiner <email@hidden>)
 >Re: list to a text representation of that list (followup) (From: David C Andrews <email@hidden>)

  • Prev by Date: Re: getting chunks of text
  • Next by Date: tell a script to tend to system process for X amount of time?
  • Previous by thread: Re: list to a text representation of that list (followup)
  • Next by thread: Re: list to a text representation of that list (followup)
  • Index(es):
    • Date
    • Thread