Re: How do I make words list from two lists?
Re: How do I make words list from two lists?
- Subject: Re: How do I make words list from two lists?
- From: Jean-Christophe Helary via AppleScript-Users <email@hidden>
- Date: Sun, 22 Sep 2019 23:17:11 +0900
> On Sep 22, 2019, at 22:53, Shane Stanley via AppleScript-Users
> <email@hidden> wrote:
>
> On 22 Sep 2019, at 10:35 pm, Noriaki Fujita via AppleScript-Users
> <email@hidden
> <mailto:email@hidden>> wrote:
>>
>> This is the method I thought of myself.
>
> I think you're over-complicating things a bit. Why not:
>
> set alist to {"T", "h", "e", "q", "u", "i", "c", "k", "b", "r", "o", "w",
> "n", "f", "o", "x"}
> set bList to {1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4}
>
> set string_list to {}
> set lastStart to 1
> repeat with n from 2 to count bList
> if item n of bList > item (n - 1) of bList then
> set end of string_list to (items lastStart thru (n - 1) of
> alist) as text
> set lastStart to n
> end if
> end repeat
> set end of string_list to (items lastStart thru -1 of alist) as text
>
> return string_list
Beautiful :)
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
_______________________________________________
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