Created
October 16, 2014 08:21
-
-
Save seungjin/4d46c77acc13b0c3b66b to your computer and use it in GitHub Desktop.
applescript that change your keyboad input type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on changeKeyboardInput(language) | |
tell application "System Events" to tell process "SystemUIServer" | |
click (menu bar item 1 of menu bar 1 whose description is "text input") | |
#click menu item theInputSource of menu 1 of result | |
click menu item language of menu 1 of result | |
end tell | |
end changeKeyboardInput | |
on run argv | |
if item 1 of argv = "en" then | |
changeKeyboardInput("U.S.") | |
else if item 1 of argv = "kr" then | |
changeKeyboardInput("2-Set Korean") | |
else if item 1 of argv = "cn" then | |
changeKeyboardInput("Pinyin - Simplified") | |
else | |
display dialog "Language not defined!" | |
end if | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment