AppleScript名:ASOCでOS内蔵辞書を串刺し検索するじっけん1 |
— Created 2015-10-22 by Takaaki Naganoya — 2015 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "dictKit" –https://github.com/mattt/DictionaryKit set dSet to current application’s TTTDictionary’s availableDictionaries() set dList to dSet’s allObjects() set aTerm to "Apple" set aResList to {} repeat with ii in dList set hitEntryList to (ii’s entriesForSearchTerm:aTerm) as list if hitEntryList is not equal to {missing value} then set aDname to ii’s |name|() as text repeat with i in hitEntryList set j to contents of i set headW to (j’s headword) set headW to headW as text set aText to (j’s |text|) set aText to aText as text set the end of aResList to {aDname, headW, aText} end repeat end if end repeat aResList |
More from my site
(Visited 52 times, 1 visits today)