Mesh Link All Open Documents in Given App (via Hook)

(uploaded in disabled state)

This macro is a utility for the Hook app by CogSci Apps. Hook allows you to link files and URLs together for quick reference. From the Hook website:

"A ‘hook’ is a contextual two-way link. You can ‘hook’ an item to as many other items as you want. When you invoke Hook on an item, you see everything you have hooked onto it. Easily navigate back & forth between hooked items."

One use case for Hook is to link files/documents together for quick reference and retrieval. When I'm interacting with an open file or document, I invoke the Hook dialog to see and retrieve other files/documents I have associated with the item I am currently working with.

In the above image, I am working with an open TextEdit document and there are two other open TE documents on my desktop. I have invoked the Hook dialog which shows me that the other two open documents are associated with the frontmost document. If I were to invoke Hook for either of the other two documents, I would see the remaining documents in the Hook dialog. In other words, these documents are all mutually linked ('mesh linked').

Getting the documents mesh linked, so that I can access the other documents from any one of the group of linked documents typically requires a series of manual steps that can be a bit time-consuming and tedious. I can link one document to another via the Hook dialog, but then I've got to repeat the step with the other document to link it back to the first. If I want to mesh link multiple open documents, that becomes a chore.

This macro mesh links all open documents in a given app, saving a lot of time. It utilizes scripts by @Nige_S (see this Macro and discussion of scripting solutions for tagging multiple open documents), and @ccstone (see discussion here) to gather the filepaths of the open documents. It then adapts a script by Brett Terpstra, to 'mesh link' the open documents together in Hook.

See also:

Mesh Link Selected Finder Items (via Hook)

Mesh Link All Tabs in Safari Window (via Hook)

Tag Open File(s)/Document(s) w/o Interacting w/Finder