• 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: Converting a nested list to return delimited string with TIDs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a nested list to return delimited string with TIDs


  • Subject: Re: Converting a nested list to return delimited string with TIDs
  • From: Ricardo Montiel <email@hidden>
  • Date: Sun, 10 Jun 2001 00:17:24 -0300

on Sat, 9 Jun 2001 02:47:00 -0600, Ehsan Saffari at
email@hidden wrote:

Hi Ehsan,

> That old trick, well done!

Yes, it's a useful trick (specially to that kind of issues that AppleScript
states that there are impossible to perform.). Another possible use, among
others, is to coerce a record to a string, and extract the record's labels,
visualize a complex record or a list structure, etc. I do have already some
code to extract the labels from a record, using ASTID and a repeat loop, it
is very fast. I can send it to you if you want to take a look. Just call.

> There is only the minor point that each item
> of each list ends up in quotes (error in my original post), but easily
> fixed:
>
> ----- Begin Script ----------------------------------------
>
> set x to {{"aa", "bb", "cc"}, {"dd", "ee", "ff"}}
>
> try
> x as date
> on error message
> set x to text 14 thru -16 of message

(*) First slice.

> end try
>
> set x to my cambiarTexto(x, "\", \"", return)
> set x to my cambiarTexto(x, "\"}, {\"", return & return)
> set x to text 2 thru -2 of x

Not that you are going to win a lot, but this second slice can be included
in the first one (*), by moving inwards the text range; i.e:

set x to text 15 thru -17 of message


HTH

Saludos (Regards),
--Ricardo


  • Prev by Date: Finding invisible files and changing their properties
  • Next by Date: Re: Dialog Director complexities [WAS: Re: Newbie Question - Hidden Password]
  • Previous by thread: Re: Converting a nested list to return delimited string with TIDs
  • Next by thread: Dropping text on to Droplets
  • Index(es):
    • Date
    • Thread