–> InputManager.framework (To ~/Library/Frameworks)
AppleScript名:InputManagerのじっけん |
— Created 2017-01-22 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "InputManager" set cList to current application’s CSInputSource’s all() –> (NSArray) {(CSInputSource) <CSInputSource: 0x60000000d310>, (CSInputSource) <CSInputSource: 0x60000000f580>, (CSInputSource) <CSInputSource: 0x60000000bd30>, (CSInputSource) <CSInputSource: 0x600000216d20>, (CSInputSource) <CSInputSource: 0x6000002168d0>, (CSInputSource) <CSInputSource: 0x600000216c50>, (CSInputSource) <CSInputSource: 0x600000012620>, (CSInputSource) <CSInputSource: 0x60000000b010>, (CSInputSource) <CSInputSource: 0x600000217010>} set dList to (cList’s valueForKey:"localizedName") as list –> {"ひらがな", "英字", "カタカナ", "日本語", "かなパレット", "com.apple.PressAndHold", "絵文字と記号", "キーボードビューア", "EmojiFunctionRowIM_Extension"} set c1 to (current application’s CSInputSource’s currentKeyboard()’s localizedName()) as string –> "ひらがな" –> "英字" set c2 to (current application’s CSInputSource’s currentKeyboardLayout()’s localizedName()) as string –> "U.S." set err1 to (current application’s CSInputSource’s forLanguage:"ja")’s |select|() log err1 set err2 to (current application’s CSInputSource’s forLanguage:"en_US")’s |select|() log err2 |
(Visited 42 times, 1 visits today)