Selecting a URL expressed as text - the elusive easy way?

The personal finances program I use on macOS (Banktivity) does not provide a field for URLs. Just a text field for notes. It also doesn’t allow documents to be attached.

I therefore paste a link to a document in DEVONthink (using DT’s Copy File Link) into Banktivity’s text field for a transaction (for many transactions). Repetitive work and all…

In theory this should mean that I can select a transaction in Banktivity, go to the notes field, click the URL and open the relevant document in DT. However, Banktivity does not recognise the URL as a URL, so my work around is to copy the text (URL) from Banktivity’s text field, open the LaunchBar input screen (via a keyboard shortcut), paste the copied text and press enter, and the DT document opens.

All good, and I plan to use Keyboard Maestro to automate all this.

But, where I am stumped is at the start of this process. What I would like to do is place the cursor somewhere in the DT URL and automagically have the whole URL selected. Normally if you place a cursor in a word, a simple double click selects the whole word. But not with a DT URL, which looks like this:


Double-clicking within such a string only selects left and right to the characters before the next hyphen (-), and not the whole URL.

To complicate things further, the text field in Banktivity may contain other text before and/or after the URL, for example:

some text - x-devonthink-item://775B6B98-F1F0-43CE-B9EC-DBC62D413358 - some other text

so selecting the whole line or paragraph using standard macOS keyboard shortcuts selects more than the URL - not helpful.

Ideally, I want to be able to place the cursor somewhere in the URL text, and invoke a Keyboard Maestro macro that selects the URL text, copies and pastes it into LaunchBar and opens the DT document.

Simple. But I am stuck on how to automate selecting the URL text (and only the URL text).

I’d love to learn of any creative ideas on how to achieve my objective, which could involve other tools as well.

(And yes, I could consider another personal finance program, but my experience to date is that they all have shortfalls that require workarounds, so whilst attachment or URL capability in another app may solve this issue, there may be others compared to Banktivity…).

1 Like

I just use popclip. Select the text and the first option is to open the url, even if it isn’t a true link.