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

Re: Getting elements of a list


  • Subject: Re: Getting elements of a list
  • From: Takaaki Naganoya <email@hidden>
  • Date: Sun, 20 Apr 2008 10:24:42 +0900

How about this ?

<AppleScript>
set aList to {1, {{1, 2}, {3, 4}, {5, 6}}}

set curDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to tab
set aText to aList as text
set bList to every text item of aText
set AppleScript's text item delimiters to curDelim

bList
--> {"1", "1", "2", "3", "4", "5", "6"}

</AppleScript>

On 2008/04/17, at 3:55, Mark J. Reed wrote:

Say I have a list of lists:

set myList to {{1,2},{3,4},{5,6}}

is there any way, without a repeat loop, to pluck a specific item of
each of the sublists?  something like

first item of each item of myList

doesn't work...



-- Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
mark.nu
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden


-- Takaaki Naganoya Piyomaru Software http://piyo.piyocast.com email@hidden

PiyoCast Web (Podcasting with Music!)
http://www.piyocast.com
Free AppleScript Library "AS Hole"
http://www.piyocast.com/as/



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Getting elements of a list
      • From: Skeeve <email@hidden>
References: 
 >Getting elements of a list (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: ? regarding rebooting apps using an applescript
  • Next by Date: Pop Ups in Safari
  • Previous by thread: Re: Getting elements of a list
  • Next by thread: Re: Getting elements of a list
  • Index(es):
    • Date
    • Thread