On Oct 17, 2016, at 15:29, Ron Feldman <ronald.feld...@linq3.com 
<mailto:ronald.feld...@linq3.com>> wrote:
> I really like making my coworkers jealous with my infinite persistent 
> clipboards, and I don't want to lose that feeling of superiority.


Hey Ron,

How about being able to easily save those “clipboards”?

Make them more jealous.

Save as a compiled script with the Script Editor.app to:

~/Library/Application Support/BBEdit/Scripts/

Give the script a keyboard shortcut or activate it from the Script menu.

-------------------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2016/10/18 03:00
# dMod: 2016/10/18 03:32 
# Appl: BBEdit
# Task: Save unsaved text documents and shell documents to a date-stamped 
folder in the Finder.
#     : Then close those documents and open the folder in the Finder.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Finder, @Save, @Unsaved, 
@Text_Documents, @Shell_Documents
-------------------------------------------------------------------------------------------

set saveFolderWasCreated to false

tell application "BBEdit"
   
   set unsavedDocList to text documents whose on disk is false
   
   if length of unsavedDocList > 0 then
      
      set saveFolderPath to makeSaveFolder() of me
      set saveFolderWasCreated to true
      
      repeat with theDoc in unsavedDocList
         set docID to ID of theDoc
         save theDoc to (saveFolderPath & (name of theDoc)) & ".txt"
         close document id docID
      end repeat
      
   end if
   
   set unsavedShellDocList to every shell document whose on disk is false
   
   if length of unsavedShellDocList > 0 then
      
      if not saveFolderWasCreated then
         set saveFolderPath to makeSaveFolder()
         set saveFolderWasCreated to true
      end if
      
      repeat with theDoc in unsavedShellDocList
         set docID to ID of theDoc
         save theDoc to (saveFolderPath & (name of theDoc)) & ".worksheet"
         close document id docID
      end repeat
      
   end if
   
end tell

if saveFolderWasCreated then
   tell application "Finder"
      activate
      open (alias saveFolderPath)
   end tell
end if

-------------------------------------------------------------------------------------------
--» HANDLERS
-------------------------------------------------------------------------------------------
on makeSaveFolder()
   set newFolderName to do shell script "date \"+%Y-%m-%d %H.%M\""
   set newFolderName to "BBEdit → Untitled Docs → Saved " & newFolderName
   tell application "Finder"
      set newFolder to make new folder at (path to desktop folder) with 
properties {name:newFolderName}
      return newFolder as text
   end tell
end makeSaveFolder
-------------------------------------------------------------------------------------------

Now then...  Let me know if you want to know how to open all the files in a 
single project window for perusal.

Of course looking through them in the Finder with Quick Look is easy enough.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to