Created
October 13, 2023 15:31
-
-
Save jonathanhle/21983fd17088a35eb9a09c211478613d to your computer and use it in GitHub Desktop.
command line apple script osascript
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
osascript <<END | |
tell application "System Events" | |
delay 0.5 | |
keystroke space using command down | |
delay 0.5 | |
set textBuffer to "TextEdit" | |
repeat with i from 1 to count characters of textBuffer | |
keystroke (character i of textBuffer) | |
delay 0.05 | |
end repeat | |
delay 0.5 | |
keystroke return | |
delay 1 | |
set textBuffer to "Hello world!" | |
repeat with i from 1 to count characters of textBuffer | |
keystroke (character i of textBuffer) | |
delay 0.05 | |
end repeat | |
end tell | |
END | |
osascript <<END | |
tell application "System Events" | |
tell application "Managed Software Center" to activate | |
delay 0.25 | |
keystroke "r" using command down | |
end tell | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment