Created
August 14, 2012 13:51
-
-
Save rwilcox/3349416 to your computer and use it in GitHub Desktop.
Run the current selection as a BBEdit clipping
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
tell application "BBEdit" | |
set theScript to selection as text | |
set clippingFileRef to (path to temporary items as string) & "clipping_as_selection" | |
--close access clippingFileRef | |
set fileref to open for access file clippingFileRef with write permission | |
set eof of fileref to 0 -- clear the file | |
write theScript to fileref | |
close access fileref | |
insert clipping clippingFileRef into window 1 | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment