Created
February 12, 2013 22:04
-
-
Save tofias/4773865 to your computer and use it in GitHub Desktop.
Makes a new file in BBEdit using contents of clipboard.
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
-- Make a BBEdit | |
-- Michael Tofias 2013-02-12 | |
-- https://gist.github.com/tofias/4773865 | |
set toPaste to the clipboard as Unicode text | |
tell application "BBEdit" | |
activate | |
make new document | |
if toPaste is not "" then | |
try | |
set properties of text window 1 to {contents:toPaste} | |
on error | |
display dialog "Something went wrong with your pasting." | |
end try | |
else | |
display dialog "Sorry, but there was nothing to paste." | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment