Where Are Prefs for Open Windows in "Windows" Palette Saved?

30 views
Skip to first unread message

Bill Kochman

unread,
Mar 17, 2021, 8:26:11 AM3/17/21
to 'Holger Bartel' via BBEdit Talk
Hello everyone,

In my daily workflow, I always have about four dozen windows open in the "Windows" palette on the far right side of my screen using the Window -> Palettes -> Windows option in the BBEdit menubar.

However, one rather annoying thing that happens is that sometimes when my computer is forced to reboot itself for whatever the reason, after it reboots, and BBEdit automatically relaunches itself -- being as it was open before the forced machine reboot occurred -- most of the windows I had open in the "Windows" palette are gone.

That means that I need to find all of those four dozen or so documents on my hard drive and manually reopen them again. It doesn't take too long to do this, being as I have done this enough times to remember which documents were open, and where they are located, but it would be nice if there was an easier way to reopen all of these windows in one shot.

Please note that when my iMac is forced to reboot itself, when BBEdit does relaunch, it does ask me if I want to reopen the docs that were previously open. However, as I said, if I say "yes", only a few of the four dozen windows are listed in the "Windows" palette.

So, I thought to myself, "Surely there must be a ".savedState" file or something somewhere in BBEdit's support files which maintains a list of all open windows." I looked in ~Library/Saved Application State, as well as in other places, but I was unable to locate a support file where this list of open windows in the "Windows" palette might be found.

My intent here to simply make a backup of this particular file and keep it on my desktop. That way, whenever I lose all of the open windows -- which are always the same set of 48 or so windows -- I can just drop a copy of this file into wherever it belongs in BBEdit's support file hierarchy.

So my question is, where is this file located, and what is it called?

I hope the above was easy enough to understand.

Thanks in advance to anyone who may choose to respond.

Kind regards

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live

Gil Dawson

unread,
Mar 17, 2021, 5:38:04 PM3/17/21
to bbe...@googlegroups.com
Hi, Bill--

whenever I lose all of the open windows -- which are always the same set of 48 or so windows -- I can...

Would a folder of aliases suffice?

--Gil

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/7D440B2A-4BE8-493D-83B1-83100FCF45C3%40gmail.com.

Bill Kochman

unread,
Mar 17, 2021, 7:12:15 PM3/17/21
to 'Holger Bartel' via BBEdit Talk
Hello Gil,

Thanks for responding.

Well, I do have Xmenu installed, so it would be very easy for me to set up something like that. Of course, while it would place those particular files in the menubar at the top of my screen, I would still have to open each one manually, which means that they would be all over my screen. In contrast, as you know, when BBEdit is launched, not only does it open all previously open docs, but it automatically minimizes them to the Dock, which I like.

Of course, if someone here could write a simple script for me — ahem … Chris? — which would open the designated files, and then minimize them to the Dock, that would be great! :)

As an alternative, what would also be nice would be if the “Login Items” feature of the “Users & Groups” prefs pane would recognize folders, and then open AND minimize to the Dock, any aliases which are found in that folder, during the login process. But that is something that would have to be taken up with Apple, no doubt.

Yet still, both of the aforementioned methods are workarounds, in my view, and should not be necessary. As I mentioned previously, BBEdit must have a file somewhere which stores a list of all open windows which are displayed in the “Windows” palette. So my preferred approach would be to make a backup copy of that file, and then to replace the current file with it, whenever I face this problem of windows disappearing from the “Windows” palette due to an unanticipated system reboot.

So again I ask, does anyone know where that list of open BBEdit windows is stored?

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live

Christopher Stone

unread,
Mar 17, 2021, 7:32:55 PM3/17/21
to BBEdit-Talk
On 03/17/2021, at 18:12, Bill Kochman <wordwe...@gmail.com> wrote:
Of course, if someone here could write a simple script for me — ahem … Chris? — which would open the designated files, and then minimize them to the Dock, that would be great! :)


Hey Bill,

If my memory is right we've had this discussion on the list about the "file" cataloging open items before, and it's not as simple as you might imagine.

BBEdit has several ways of presenting files in windows.

What's your set-up?

One file per window?

Multiple files per window?

Project windows?

Depending upon the answer this could be easy, or this could be difficult.

--
Best Regards,
Chris

Bill Kochman

unread,
Mar 17, 2021, 7:42:00 PM3/17/21
to 'Holger Bartel' via BBEdit Talk
Hello Chris,

I kind of figured I might get your attention. :)

Each of the 48 or so windows which I constantly have in the “Windows” palette are individual BBEdit text files. Some are HTML files, but they are also set to open with BBEdit. These files are scattered all over my hard drive. I use most of them constantly, which is why I have so many windows in the palette.

So, I must ask you then. Does the fact that you are taking interest in this mean that there is not just one file somewhere in BBEdit’s folder and file hierarchy where this information is stored? I looked in the "Application Support" folder and I couldn’t find anything. I looked in the “Containers” folder and couldn’t find anything there either. Last of all, I looked in the “Preferences” folder as well, and I couldn’t find anything there either. I wonder if I need to poke around in package contents next in the app itself. :)

So, what do you think, my friend?

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://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+un...@googlegroups.com.

Neil Faiman

unread,
Mar 17, 2021, 7:49:12 PM3/17/21
to BBEdit Talk Mailing List
My experience has been that BBEdit is consistently impeccable about reopening all windows and their contents, after an app quit, after a logout, after a system shutdown, even after a crash. If it is regularly losing windows for you, it sounds like something might be broken in your installation. Rather than wasting time trying to cobble together a workaround, I would suggest going straight to BBEdit tech support.

Regards,

Neil Faiman

bruce linde

unread,
Mar 17, 2021, 7:52:18 PM3/17/21
to 'Gregory Shenaut' via BBEdit Talk
i have on (rare) occasion had palettes disappear, or their positions forgotten. i’ve sent emails to support and gotten pretty quick ’try this’ responses… each of which resolved my issue until the next release came out.

they’re like maytag repair people… just waiting for something they can fix.   8-)














bruce linde
5 happiness webmaster (four more than the competition!)
http://www.5happy.com/
http://clockhappy.com/
510.530.1331 office
510.206.9730 mobile

(shift key available upon request)








Bill Kochman

unread,
Mar 17, 2021, 9:03:54 PM3/17/21
to bbe...@googlegroups.com
Hello Neil,

I agree that BBEdit is a pretty solid app. To my recollection, it has rarely, if ever, crashed. No, the lost windows does not happen regularly, not everyday, and not even every week. And when these occasional system crashes do occur, I am not even sure what is causing them. Sometimes they occur while I am asleep, or at least away from my computer. To date, I have no reason to believe that they are related to BBEdit. I think the BBEdit window losses are just one of the results of the system crashes.

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live

Bill Kochman

unread,
Mar 17, 2021, 9:07:59 PM3/17/21
to 'Holger Bartel' via BBEdit Talk
Bruce,

I may end up doing that. But then, they are probably reading this thread already anyway. :)

I didn’t know that about Maytag people. But now you’ve got me wondering. Does Rich just wait for something to fix? Or does he hope that nothing ever breaks? :)

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live

Kerri Hicks

unread,
Mar 17, 2021, 9:24:16 PM3/17/21
to bbe...@googlegroups.com
On Wed, Mar 17, 2021, 9:08 PM Bill Kochman <wordwe...@gmail.com> wrote:

Does Rich just wait for something to fix? Or does he hope that nothing ever breaks? :)

I'm sure he's just sitting on the sofa waiting for you to write in, with nothing else to do. ;-)

But yes, you should always write to support.

--Kerri

bruce linde

unread,
Mar 17, 2021, 9:25:41 PM3/17/21
to 'Gregory Shenaut' via BBEdit Talk
i understand that he has no furniture, as he has no time to sit.









--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://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+un...@googlegroups.com.

Bruce Van Allen

unread,
Mar 17, 2021, 9:30:02 PM3/17/21
to 'Holger Bartel' via BBEdit Talk
Hi Bill,

On 17 Mar 2021, at 16:12, Bill Kochman wrote:

> … So my preferred approach would be to make a backup copy of that
> file, and then to replace the current file with it, whenever I face
> this problem of windows disappearing from the “Windows” palette
> due to an unanticipated system reboot.
>
> So again I ask, does anyone know where that list of open BBEdit
> windows is stored?

Not that file, but isn’t your goal in effect what a BBEdit Project
provides?

I have several work projects going, each with many files that I have to
move among while working on that project. They’re often not all in the
same folder, sometimes not even on the same disk.

So for each of my work projects, I create a BBEdit Project (File -> New
-> Project…), and use the ‘+’ button lower left to add all the
files and directories I need together for that one of my projects. They
all show in the left sidebar, and the open ones have a little indicator,
which highlights if there are unsaved changes in that file. Directories
can be clicked closed when there are so many files that the sidebar has
to be scrolled. (Some of my projects have hundreds of files.)

I’m fortunate to have a large monitor, so I have plenty of screen
space for a wide BBEdit window with the sidebar showing the project
files.

Opening the project is one click on the icon, or pick one line from
Recent Files.

Zat get you what you want?

Thanks,

- Bruce

_bruce__van_allen__santa_cruz__ca

Bill Kochman

unread,
Mar 18, 2021, 9:37:02 AM3/18/21
to 'Holger Bartel' via BBEdit Talk
Hi Bruce,

Thanks for the suggestion, but what you describe is actually a lot more complicated than what I need. In fact, what I need is ALREADY present on the “Windows” palette on the far right side of my screen. I don’t really need to set up a new system of projects as you describe.

Basically, I use the “Windows” palette as a huge pasteboard to copy and paste snippets of data, or even entire document templates, into new text and HTML documents, into my blog posts, into my social media posts, etc. I use a separate pasteboard app in my menubar for regular copying and pasting of small strings of text. But when it comes to larger things, BBEdit’s “Windows” palette works perfectly fine for me, and I use it many times throughout the day, and everyday.

As I have already stated, my singular concern is simply preserving the displayed list of windows in the palette, when they are unexpectedly lost due to one of these unanticipated — and forced — system reboots. There is a lot going on, on my machine on any given day, so I don’t even mess with trying to figure out why these reboots occasionally occur.

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live
--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://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+un...@googlegroups.com.

Kerri Hicks

unread,
Mar 18, 2021, 9:43:05 AM3/18/21
to bbe...@googlegroups.com
Maybe it's time to reiterate what a few of us have mentioned so far:

Screen Shot 2021-03-18 at 9.41.27 AM.png

--Kerri


Bill Kochman

unread,
Mar 18, 2021, 10:10:33 AM3/18/21
to bbe...@googlegroups.com
Hello Kerri,

Okay, I am a little confused here. Over the many years that I have used BBEdit, and participated on this list, I have seen a lot of discussions where list members ask questions and get answers and solutions from other list members. Certain members here have been very generous with their time, and with their particular skills. They have donated free scripts, provided different methods for getting things done, taught new users how to use certain BBEdit features, etc.

So, if these aren’t the kinds of things which we are supposed to be discussing here, then exactly what is permissible on this list, and what isn’t allowed? It seems to me that the lines have become rather blurred.

I started this discussion thread with a simple question: Where is the list of open BBEdit windows stored on my hard drive?

That is all I need to know. I assumed — perhaps erroneously so — that someone with a more thorough knowledge of BBEdit’s folder and file hierarchy would provide me with a quick, short answer. But apparently, no one seems to know where this information is stored.

I am not making a feature request; and in my view, neither do I need expansive technical support. I simply need an answer to that one simple question. Thus, I did not see the need to bother Rich and Patrick with it, when I am sure that they are busy with much more important matters. However, if no one here can answer my question, then, yes, I will write directly to them.

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live


On Mar 18, 2021, at 11:42 PM, Kerri Hicks <kerri...@gmail.com> wrote:

Maybe it's time to reiterate what a few of us have mentioned so far:


--Kerri


Patrick Woolsey

unread,
Mar 18, 2021, 10:13:38 AM3/18/21
to bbe...@googlegroups.com
Hi Bill,

For reference, the Windows palette does nothing more (and nothing less :-) than list all the documents & windows currently open within BBEdit, but plays no part in managing the latter.

Thus, if BBEdit occasionally does not reopen all the documents that you expected, _this_ is the actual issue and it is therefore time to contact tech support. :-)

Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <https://www.barebones.com/>



> On Mar 18, 2021, at 09:36, Bill Kochman <wordwe...@gmail.com> wrote:
>
> Thanks for the suggestion, but what you describe is actually a lot more complicated than what I need. In fact, what I need is ALREADY present on the “Windows” palette on the far right side of my screen. I don’t really need to set up a new system of projects as you describe.
>
> [...]
> As I have already stated, my singular concern is simply preserving the displayed list of windows in the palette, when they are unexpectedly lost due to one of these unanticipated — and forced — system reboots. There is a lot going on, on my machine on any given day, so I don’t even mess with trying to figure out why these reboots occasionally occur.
>

[ ... remainder elided ... ]

Sam Hathaway

unread,
Mar 18, 2021, 2:04:32 PM3/18/21
to bbe...@googlegroups.com

On 18 Mar 2021, at 10:10, Bill Kochman wrote:

I started this discussion thread with a simple question: Where is the list of open BBEdit windows stored on my hard drive?

If you’ll only be satisfied with a direct answer to your exact question, then here:

~/Library/BBEdit/Saved Application State-{Some GUID}.appstate

But I doubt you’ll be able to do anything with it.

🤷‍♀️
-sam

Bill Kochman

unread,
Mar 18, 2021, 2:40:20 PM3/18/21
to bbe...@googlegroups.com
Hello Sam,

Thanks for your response. Actually, that is EXACTLY the answer that I needed. In fact, only minutes after you responded to me, Rich wrote to me privately and pointed me to the very same file. :)

So for now, until I can figure out why my machine periodically crashes and wipes out the open windows data in BBEdit, I will be keeping a backup copy of both ~/Library/BBEdit and also ~/Library/Application Support/.

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live

Christopher Stone

unread,
Mar 18, 2021, 9:23:07 PM3/18/21
to BBEdit-Talk
Create Aliases of All Files Open in BBEdit in a Date-Stamped Folder.scptd.zip

Bill Kochman

unread,
Mar 18, 2021, 9:54:48 PM3/18/21
to 'Holger Bartel' via BBEdit Talk
Hello Chris,

It seems that you and I were thinking along the very same lines. In fact, nine hours ago, I informed Rich via private email that I had basically done the same thing as what you accomplish in this script, but manually, being as I am no AppleScript expert. In other words, I manually made aliases of all 81 open docs, and put them in a folder on my desktop. As you suggest in your message, I then use command-o followed by option-command-m to minimize the open documents to the Dock.

But, of course, your script has the added advantage of saving me time, and allowing me to create an up-to-date list of the aliases on the spot, so thank you for that. I appreciate all of your contributions to myself, and to everyone else on this list as well. :)

Kind regards,

Bill Kochman, Administrator
Bill’s Bible Basics / Christian Social Network
wordwe...@gmail.com
https://www.billkochman.com
https://www.csnet.live
On Mar 19, 2021, at 11:23 AM, Christopher Stone <listmei...@gmail.com> wrote:


--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/5CBA1103-5ECF-40CA-A6FB-2B8393E60E90%40gmail.com.
<Create Aliases of All Files Open in BBEdit in a Date-Stamped Folder.scptd.zip>

Christopher Stone

unread,
Mar 18, 2021, 10:34:21 PM3/18/21
to BBEdit-Talk
Parse the BBEdit Saved-State File for Open File Paths.scptd.zip

Christopher Stone

unread,
Mar 18, 2021, 10:52:41 PM3/18/21
to BBEdit-Talk
On 03/17/2021, at 18:41, Bill Kochman <wordwe...@gmail.com> wrote:
So, I must ask you then. Does the fact that you are taking interest in this mean that there is not just one file somewhere in BBEdit’s folder and file hierarchy where this information is stored?


It looks like Google Groups ate my text, since the attachment was at the top of my email, so I'm resending the body.



Hey Bill,

Sam showed you where the file was.  It seems my memory was faulty, or it dates back to before the saved-state file existed...  :-)

Personally I would not depend upon the saved-state file, as it's mutable and will change right at the moment you don't want it to.

Even if you saved various versions of it, you still have to parse it, extract the file-URLs, convert them into a usable format, and open them.

The attached script will create a date-stamped folder of aliases to all files open in BBEdit at the time the script is run.

Give it a keyboard shortcut like Control-S, and you can create a new save-state on demand.

To open the files go to the saved-state folder, select all the aliases, and hit Cmd-O in the Finder.

It wouldn't be hard to write a script to open the last saved-state, or even one to provide a list of saved-states to pick from.

There are other ways to do this of course, but let's start here.

--
Best Regards,
Chris



--------------------------------------------------------
# Auth: Christopher Stone <script...@thestoneforge.com>
# dCre: 2021/03/18 19:06
# dMod: 2021/03/18 19:06 
# Appl: BBEdit, Finder
# Task: Create Aliases of All Files Open in BBEdit in a Date-Stamped Folder.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @ASObjC, @BBEdit, @Finder, @Saved, @State
--------------------------------------------------------

use AppleScript version "2.4" --» Yosemite or later
use framework "Foundation"
use scripting additions

--------------------------------------------------------
--» USER SETTING -- Saved State Location
--------------------------------------------------------
set bbeditSavedStateFolderPath to "~/Documents/BBEdit Saved-State/"
--------------------------------------------------------

set bbeditSavedStateFolderPath to my expandTildeInPath:bbeditSavedStateFolderPath

if itemExists(bbeditSavedStateFolderPath) = false then
    my createDirectoryAtPathWithIntermediates:bbeditSavedStateFolderPath
end if

set dateStr to my dateStamp(current date)
set newFolderName to "BBEdit Saved State – " & dateStr

tell application "BBEdit"
    set AppleScript's text item delimiters to linefeed
    set fList to (file of documents whose on disk is true)
end tell

tell application "Finder"
    set destFldr to (make new folder at (POSIX file bbeditSavedStateFolderPath) with properties {name:newFolderName}) as alias
    repeat with i in fList
        make new alias file at destFldr to i
    end repeat
end tell

--------------------------------------------------------
--» HANDLERS
--------------------------------------------------------
on createDirectoryAtPathWithIntermediates:thePath
    set {theResult, theError} to current application's NSFileManager's defaultManager()'s createDirectoryAtPath:thePath ¬
        withIntermediateDirectories:true attributes:(missing value) |error|:(reference)
    if not (theResult as boolean) then
        set errorMsg to theError's localizedDescription() as text
        error errorMsg
    end if
end createDirectoryAtPathWithIntermediates:
--------------------------------------------------------
on dateStamp(theDate)
    set dateDelim to "-"
    set timeDelim to "."
    tell theDate as «class isot» as string to ¬
        set {yyyy, mm, dd, hh, mm, ss} to ¬
            {its text 1 thru 4, its text 6 thru 7, its text 9 thru 10, its text 12 thru 13, its text 15 thru 16, its text 18 thru 19}
    return yyyy & dateDelim & mm & dateDelim & dd & space & hh & timeDelim & mm & timeDelim & ss
end dateStamp
--------------------------------------------------------
on expandTildeInPath:tildeBasedPath
    set expandedPath to (current application's NSString's stringWithString:tildeBasedPath)'s stringByExpandingTildeInPath
    return expandedPath as text
end expandTildeInPath:
--------------------------------------------------------
on itemExists(posixPath) --> Boolean output
    set posixPath to (current application's NSString's stringWithString:posixPath)'s stringByExpandingTildeInPath
    set myNSURL to current application's |NSURL|'s fileURLWithPath:posixPath
    set itemExistsBool to (myNSURL's checkResourceIsReachableAndReturnError:(missing value)) as boolean
    return itemExistsBool
end itemExists
--------------------------------------------------------

Christopher Stone

unread,
Mar 18, 2021, 10:53:15 PM3/18/21
to BBEdit-Talk

It looks like Google Groups ate my text, since the attachment was at the top of my email, so I'm resending the body.



Hey Sam,

I'll take that challenge.  😎

It wasn't simple by any means, but it wasn't especially difficult either.

I'm naming the document in BBEdit but saving it is left to the user.  If I was doing this for myself I'd auto-save the file to a specific location on my hard drive, but I'm done for the day.

--
Best Regards,
Chris



--------------------------------------------------------
# Auth: Christopher Stone <script...@thestoneforge.com>
# dCre: 2021/03/18 21:10
# dMod: 2021/03/18 21:27
# Appl: BBEdit, Finder, System Events
# Task: Parse the BBEdit Saved-State File for Open File Paths.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @ASObjC, @Finder, @System_Events, @Parse, @BBEdit, @Saved-State
--------------------------------------------------------
use framework "Foundation"
use scripting additions
--------------------------------------------------------

set bbeditLibFolderAlias to ((path to library folder from user domain as text) & "BBEdit") as alias
set tempDirAlias to (path to temporary items from user domain)

tell application "Finder"
    set bbeditSavedStateFile to (files of bbeditLibFolderAlias whose name starts with "Saved Application State") as alias list
    
    if length of bbeditSavedStateFile = 1 then
        set {bbeditSavedStateFile} to bbeditSavedStateFile
    else
        error "Too many saved-state files were found!"
    end if
    
    set tempSavedStateFile to (duplicate bbeditSavedStateFile to tempDirAlias with replacing) as alias
    
end tell

set tempSavedStateFilePath to POSIX path of tempSavedStateFile

set fileURLList to {}

tell application "System Events"
    tell property list file tempSavedStateFilePath
        tell property list item "OpenDocuments"
            set itemList to (get property list items's value)
            repeat with i in itemList
                try
                    set urlString to i's |Location|'s |FileURLString|
                    tell AppleScript
                        set posixPath to (current application's class "NSURL"'s URLWithString:urlString)'s |path|() as text
                        set end of fileURLList to posixPath
                    end tell
                end try
            end repeat
        end tell
    end tell
end tell

set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text item delimiters, linefeed}

set fileURLList to fileURLList as text

set AppleScript's text item delimiters to oldTIDS

set newDocName to "BBEdit Open Files – " & dateStamp(current date) & ".txt"

tell application "BBEdit"
    activate
    make new document with properties {name:newDocName, text:fileURLList, bounds:{303, 45, 1617, 1196}}
end tell

--------------------------------------------------------
--» HANDLERS
--------------------------------------------------------

Greg Raven

unread,
Mar 19, 2021, 8:37:26 AM3/19/21
to BBEdit Talk
"i understand that he has no furniture, as he has no time to sit."

Hence the ponies.
Reply all
Reply to author
Forward
0 new messages