Re: Getting elements of a list
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