AppleScript名:リスト中の指定アイテムを削除する(登場アイテム番号自動検索) |
— Created 2017-04-11 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aTargValue to 2 set anArray to current application’s NSMutableArray’s arrayWithArray:{5, 2, 1, 3, 4} set aInd to anArray’s indexOfObject:aTargValue if aInd = current application’s NSNotFound or (aInd as real > 9.99999999E+8) then return {} anArray’s removeObjectAtIndex:aInd return anArray as list –> {5, 1, 3, 4} |
More from my site
(Visited 23 times, 1 visits today)