Getting Things 3 List ID

I built a rather bulky macro to right click on a project or Area in Things 3 navigate to the share buttons and select Copy Link so I can get the Project ID.

I am not sure there is anything I can improve about the right click and menu item navigate as you need to use the mouse right on the list itself to get to the share link

But I am NOT strong with RegEX and I know instead of using "Get Substring of clipboard" I could use RegEx to trim out "things:///show?id=" to just get the ID # itself to the clipboard.

00)Get Project iD.kmmacros (33.5 KB)

Learning more about RegEX is something I want to spend more time with this fall and I thought this bulky macro would be the way to do it

I have attached the macro and would love to make it work a bit smoother.

Hi Brian,

Here's a revised version:
00)Get Project iD v2.kmmacros (29 KB)

and here are a few scattered thoughts:

I recommend Select or Show a Menu Item instead of clicks and keystrokes. Typically UI manipulation (especially with the mouse) is more tedious and less reliable, so I avoid it where I can.

In this instance, Get Substring is simpler than using regular expressions, and there's nothing wrong with what you already had. I've left both options available.

The only issue with the regular expression you had was that the question mark is a reserved character (used for many things, most commonly as a quantifier), so we have to escape it with a backslash.

As you're getting started, I recommend the Keyboard Maestro wiki reference for regular expressions. You can also practice and get some feedback from tools like regex101.

1 Like

I agree with you and i use menu item but the item i am looking for is only avaiable via a right click meni item and not in the menu bar at all

The macro I posted is using the menu item at Items -> Share -> Copy Link which provides the Project ID.

Is there another task you're trying to do that doesn't have a menu item? We might be able to work something out with AppleScript (Cultured Code provides a fairly impressive dictionary).

ohh wow Sorry i was on mobile when i replied!

Digging into Get Substring now.

No thankfully the only place I am usng hte right click menu with is in Apple Music to select a playlist and hit "Copy Sort Order"

This is so helpful thank you! Helps me wrap my head around it better!

And for clarity, I was right-clicking on the areas themselves which is why I needed/thought I needed the right click, I see you can just select a task within the area or project to accomplish the same thing that your macro taught me!

1 Like