AppleScript名:配列の要素を逆順に取得する |
— Created 2015-09-02 by Takaaki Naganoya — 2015 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set anArray to current application’s NSArray’s arrayWithArray:{1, 2, 3} –> (NSArray) {1, 2, 3} –要素を逆順に取得する set revEnum to anArray’s reverseObjectEnumerator() –> (__NSArrayReverseEnumerator) <__NSArrayReverseEnumerator: 0x610000a3c600> repeat set aValue to revEnum’s nextObject() if aValue = missing value then exit repeat log aValue as list of string or string end repeat |
More from my site
(Visited 64 times, 1 visits today)