Skip to content

Instantly share code, notes, and snippets.

@gautierdag
Last active September 9, 2020 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gautierdag/69d11b9220f2ff5d8de5040b43c69e16 to your computer and use it in GitHub Desktop.
Save gautierdag/69d11b9220f2ff5d8de5040b43c69e16 to your computer and use it in GitHub Desktop.
MacOS macro for wrapping line in text with print("....")
# 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