Created
February 4, 2017 16:20
-
-
Save vgan/54a404969c5b141bc89cf7ead83dde34 to your computer and use it in GitHub Desktop.
Generates a sentence using MacOS QuickType and speaks it with Daniel.
This file contains 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
tell application "TextEdit" | |
activate | |
make new document at the front | |
end tell | |
tell application "System Events" | |
repeat 10 times | |
key code 53 using {option down} | |
key code 49 | |
end repeat | |
key code 53 using {option down} | |
keystroke ". " | |
end tell | |
tell application "TextEdit" | |
set theText to (the text of the front document) as string | |
say theText using "Daniel" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment