Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Run the current selection as a BBEdit clipping
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
You can’t perform that action at this time.