OK, by request, here are a couple of screen shots from my main AutoHotKey script.
The first is a ListView, showing how it loads the Binder XML. (Most entries masked.) Type and Preferred Date are my own fields. Beyond the doc title we have the Parent ID, Parent Title, Tree Depth and the Load Sequence. Everything’s sortable by clicking on a column, of course, so if we sort by Load Sequence we’ll see documents listed in the order they’d appear in an expanded binder within Scrivener.
Here’s the Inspector as I typically use it. The script’s GUI overlays some sections, with a small notch for the Label dropdown.
The .ymd file in Doc Refs is a dummy file generated against a text date or the session date. It’s recognized on load as the data for the document’s PrefDate. The “Article .typ” entry is a real internal XRef whose name becomes source data for the ListView’s Type field. Thus I can cluster all documents of type “Article” together. (There’s another “.typ” entry shown in the Listview, “Foods”. Itself of type DataElmt, and with parent “Document Types”.)
The 5346 entry is the really clever one, if I may say so. It’s the DocID in a binary notation, with exclamation points representing one, inverted exclamations zero. (These characters kern tightly and uniformly with each other in any sane typeface.) Four times per second, the script searches the screen for an image of the attention character, a Latin Small Letter T with Stroke: ŧ. If the script finds that character, it adds row and column offsets, then interrogates every fourth pixel rightward, 16 of the next 64, along the row that aligns with the single pixel gap in each inverted exclamation. The script adds the correct power of two for each dark pixel read, and thus derives the DocID.
A TextBox at the bottom shows that the script has recognized the DocID in the editor as I navigate around Scrivener. It also displays the wrapped title and the Parent title, two fields not seen easily otherwise.
There’s a ListView with bidirectional Doc Refs as well, and more richly clustered relationships. Just a few thousand AutoHotkey lines, and time very well spent.
(Sorry for the initial tepid reply, born of privacy concerns. Easily addressed by masking the doc titles.)
Rgds – Jerome