# dCre: 2018/07/20 07:32
# dMod: 2018/07/20 07:32
# Appl: BBEdit
# Task: Dump BBEdit Clipboards to a new document.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Dump, @BBEdit, @Clipboards, @New, @Document
----------------------------------------------------------------
set _sep to linefeed & linefeed & "----------------------------------------------------------------" & linefeed & linefeed
set clipList to {}
tell application "BBEdit"
repeat with i from 1 to 6
set end of clipList to (contents of clipboard i)
end repeat
end tell
set AppleScript's text item delimiters to _sep
bbeditNewDoc(clipList as text, true)
----------------------------------------------------------------
--» HANDLERS
----------------------------------------------------------------
on bbeditNewDoc(_text, _activate)
tell application "BBEdit"
set newDoc to make new document with properties {text:_text, bounds:{0, 44, 1920, 1200}}
tell newDoc
select insertion point before its text
end tell
if _activate = true or _activate = 1 or _activate = "activate" then activate
end tell
end bbeditNewDoc
----------------------------------------------------------------
Personally I recommend a clipboard manager. They are more full-featured and are a great productivity enhancement.
I also have scripts for BBEdit that let me save the current clipboard to 1 of 10 pseudo-clipboards and can copy to or paste from with 1 keystroke.