• 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: FW: Making a list of lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FW: Making a list of lists


  • Subject: Re: FW: Making a list of lists
  • From: John Stewart <email@hidden>
  • Date: Wed, 1 Jan 2003 17:30:01 -0500

On Wednesday, January 1, 2003, at 03:07 PM, Jerry Podhajsky wrote:

I'm sure this is really simple, but I can't seem to find
any good
reference on it. I want to make a list of lists:

set d1 to {date "9/8/20", 1}
set d2 to {date "1/1/02", 2}
set d3 to {date "12/1/02", 3}

set masterlist to {}

set masterList to d1 & d2 & d3 -- yields a string
concatenation of all
the list items.

The result I want is:

{{date "9/8/20", 1},{date "1/1/02", 2},{date "12/1/02",
3}}

All help appreciated.

jp

To build your list of lists in this particular instance:

set masterlist to {d1, d2} -- or {d1, d2, d3}
--> {{date "Tuesday, September 8, 2020 12:00:00 AM", 1}, {date "Tuesday, January 1, 2002 12:00:00 AM", 2}}

-- and to add an item to a pre-existing list

set end of masterlist to d3
--> {date "Sunday, December 1, 2002 12:00:00 AM", 3}

return masterlist
--> {{date "Tuesday, September 8, 2020 12:00:00 AM", 1}, {date "Tuesday, January 1, 2002 12:00:00 AM", 2}, {date "Sunday, December 1, 2002 12:00:00 AM", 3}}

John
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >FW: Making a list of lists (From: "Jerry Podhajsky" <email@hidden>)

  • Prev by Date: Re: GUI scripting 101
  • Next by Date: Re: (no subject)
  • Previous by thread: FW: Making a list of lists
  • Next by thread: Re: FW: Making a list of lists
  • Index(es):
    • Date
    • Thread