Created
August 25, 2023 05:31
-
-
Save rubenvarela/9a828acaa1ab88d70802d2b0ab9a3a4d to your computer and use it in GitHub Desktop.
apple script to bring iterm to the front and hit enter -- (keep ssh connection active for example)
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
set i to 0 | |
repeat while i < 15 | |
-- set i to i + 1 | |
-- https://eastmanreference.com/complete-list-of-applescript-key-codes | |
-- https://apple.stackexchange.com/questions/63897/can-a-mac-be-programmed-to-simulate-pressing-a-key-at-a-certain-rate-via-softwar | |
delay 20 | |
tell application "iTerm" to activate | |
delay 1 | |
tell application "System Events" | |
key code 36 -- Send Return key press | |
end tell | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment