Created
August 6, 2014 19:11
-
-
Save elventear/cd508811db24b108dc72 to your computer and use it in GitHub Desktop.
Type text from Clipboard
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
set numbers_key_codes to {29, 18, 19, 20, 21, 23, 22, 26, 28, 25} | |
set input to do shell script "pbpaste" | |
if (input is not missing value) then | |
tell application "System Events" | |
repeat with char in the characters of input | |
try | |
set test to char as number | |
key code numbers_key_codes's item (char + 1) | |
on error | |
keystroke char | |
end try | |
end repeat | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment