AppleScript名:NSDictionaryを値とキーの列挙で作成する 2 |
— Created 2017-03-03 01:16:41 +0900 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set bundleList to {"com.apple.filemerge", "com.barebones.bbedit", "com.barebones.textwrangler"} set dummyList to {"fdummy", "bbedummy", "twdummy"} set aDict to current application’s NSMutableDictionary’s dictionaryWithObjects:dummyList forKeys:bundleList –> (NSDictionary) {com.apple.filemerge:"fdummy", com.barebones.textwrangler:"twdummy", com.barebones.bbedit:"bbedummy"} set aRes to aDict’s valueForKey:"com.barebones.bbedit" –> (NSString) "bbedummy" |
More from my site
(Visited 34 times, 1 visits today)