AppleScript名:asoc_レコード内の計算(最大)v2 |
— Created 2014-11-19 by Takaaki Naganoya — 2014 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aCompanyRec to {employees:{{age:20, nameStr:"A"}, {age:23, nameStr:"B"}, {age:19, nameStr:"C"}}} set aDic to current application’s NSDictionary’s dictionaryWithDictionary:aCompanyRec set aveAge to (aDic’s valueForKeyPath:"employees.@max.age") set aveAgeNum to aveAge as real –> 23.0 |
More from my site
(Visited 30 times, 1 visits today)