Last active
September 9, 2020 09:22
-
-
Save gautierdag/69d11b9220f2ff5d8de5040b43c69e16 to your computer and use it in GitHub Desktop.
MacOS macro for wrapping line in text with print("....")
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
# https://apple.stackexchange.com/questions/175215/how-do-i-assign-a-keyboard-shortcut-to-an-applescript-i-wrote | |
on run {input, parameters} | |
tell application "System Events" | |
key code 123 using command down | |
keystroke "print(" | |
key code 124 using command down | |
keystroke ")" | |
end tell | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment