• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Open BBEdit Recent Items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Open BBEdit Recent Items


  • Subject: Open BBEdit Recent Items
  • From: Christopher Stone <email@hidden>
  • Date: Fri, 12 Sep 2014 16:25:57 -0500

Hey Folks,

Last night I had a crash in BBEdit (unusual).  Usually BBEdit restarts exactly as it quit with all documents saved or not.  Unfortunately this particular crash hosed the document-state, and I lost some work.  Nothing too important as the non-transient stuff was saved.

In any case the incident prompted me to do something I've been meaning to get to - I finally wrote a script to open all Recent Items.

I have a Keyboard Maestro macro that actually opens the Recent Items menu for quick access, but I didn't want to open a bunch of items piecemeal.

This thing needs more intelligence, but it's not bad as a first effort.

--
Best Regards,
Chris

--------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2014/09/12 16:08
# dMod: 2014/09/12 16:08 
# Appl: BBEdit
# Task: Open All Existing Recent Items.
# Libs: None
# Osax: Satimage.osax { http://tinyurl.com/dc3soh }
# Tags: @Applescript, @Script, @BBEdit, @Open, @Recent, @Items
--------------------------------------------------------------------------

set fileStillExistingList to {}

set shCmd to "#! /usr/bin/env bash
defaults read com.barebones.bbedit \\
| sed -En '/ *\"RecentItems:ItemData\" =/, / *RecentOpenByNameStrings =/{
  / * Folder =/,/ * Project =/d
  /TextTransform =/,/\"RecentItems:ItemData\" =/d
  /FileURL = /{
    s/ *FileURL = //
    s/\"//g
    s/;$//
    p
  }
}';
"
set fileList to do shell script shCmd
set fileList to paragraphs of fileList

repeat with i in fileList
  try
    set end of fileStillExistingList to absoluteURL i as alias # Satimage.osax
  end try
end repeat

tell application "BBEdit"
  open fileStillExistingList
end tell

--------------------------------------------------------------------------

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Autosave Numbers document
  • Next by Date: Re: Autosave Numbers document
  • Previous by thread: Re: Autosave Numbers document
  • Next by thread: Add event to Calendar
  • Index(es):
    • Date
    • Thread