Re: Position of an element in a list
Re: Position of an element in a list
- Subject: Re: Position of an element in a list
- From: "Nigel Garvey" <email@hidden>
- Date: Wed, 2 Aug 2017 13:53:55 +0100
Yvan KOENIG wrote on Wed, 2 Aug 2017 14:16:59 +0200:
>set theList to {5, 2, 6, 9, 4, "TTT", 6, current date, 3, weekday of
>(current date)}
>--> under 10.10.5 --> {5, 2, 6, 9, 4, TTT, 6, date mercredi 2 août 2017
>14:02:40, 3, Wednesday}
>--> under 10.12.6 --> {5, 2, 6, 9, 4, TTT, 6, date mercredi 2 août 2017
à
>14:09:51, 3, Wednesday*)
>
>its indexOf:(current date) inList:theList
>log "index of (current date) [" & (current date) & "] : " & result
>--> under 10.10.5 --> (*index of (current date) [mercredi 2 août 2017
>14:02:40] : 0*)
>--> under 10.12.6 --> (*index of (current date) [mercredi 2 août 2017 à
>14:09:51] : 8*)
>
>its indexOf:(weekday of (current date)) inList:theList
>log "index of (weekday of (current date)) [" & weekday of (current
date) &
>"] : " & result
>--> under 10.10.5 --> (*index of (weekday of (current date))
[Wednesday] :
>0*)
>--> under 10.12.6 --> (*index of (weekday of (current date))
[Wednesday] :
>10*)
I get the 10.12.6 results in 10.11.6 (but with dates in English, of
course).
So Shane's right. The ASObjC handler too has limitations except in El
Capitan or later.
NG
_______________________________________________
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