Skip to content

Instantly share code, notes, and snippets.

@autosquid
Created May 29, 2015 03:20
Show Gist options
  • Save autosquid/aa2e404703ddd6394cd7 to your computer and use it in GitHub Desktop.
Save autosquid/aa2e404703ddd6394cd7 to your computer and use it in GitHub Desktop.
the cmd-a, cmd-c, cmd-v, cmd-w things: copy text from chrome tabs to textedit (for my bibtex)
on run {input, parameters}
if application "TextEdit" is not running then
tell application "TextEdit"
make new document at the front
end tell
end if
tell application "Google Chrome" to tell tab 1 of window 1
select all
copy selection
close
end tell
tell application "TextEdit"
activate
tell front document to set it's text to it's text & (the clipboard) & (ASCII character 10) & (ASCII character 10)
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment