AppleScript名:指定ラベルと指定属性値でレコードに追加 |
— Created 2017-03-16 11:51:08 +0900 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aRec to {f1:"1", f2:"2", f3:"3"} set bRec to addValueForKey(aRec, "100", "f10") of me –> {f1:"1", f3:"3", f10:"100", f2:"2"} on addValueForKey(aRec, aVal, aKey) set aDict to current application’s NSMutableDictionary’s dictionaryWithDictionary:aRec aDict’s addObject:aVal forKey:aKey return aDict as record end addValueForKey |
More from my site
(Visited 17 times, 1 visits today)