Hook and Merlin Project

Hi there
I wondered whether anyone is using Hook with Merlin Project? I’m new to Hook so it may be my error, but when I select an item in Merlin Project and launch Hook, it always picks up the file, not the selected item. Items in Merlin Project have individual URLs and these can be copied using ‘Copy URL’ from a menu item within Merlin, but not by launching Hook. The problem with the manual method is that then Hook shows the name of the link as the URL code (such as 5xC8JQocRpussCJ_E1ClVQ) rather than the name of the item.
I’d appreciate it if anyone can point me to a solution, and apologies for a newbie question. :blush:
with best wishes
Claire.

Does Merlin provide a keyboard shortcut for Copy Link or Copy URL? That would be a starting point.

Hook has a rename feature in HOOKED section. In 2.3 it will be in Title and elsewhere. So as a stop gap, one could at least rename the links.

If you paste the MP links in text edit or Pages do you get a formatted link? (Some apps will take the name, some the URL, others both).

I see it has an AppleScript dictionary. we’ll have a look.
Updated 2021-03-16 5:23 PM

Hi Luc

Many thanks for your prompt response. :blush: In answer to your queries -

  • Merlin doesn’t provide a keyboard shortcut for Copy URL.
  • Pasting a link produces: merlinproject:///-/90BC1896-F2A0-4442-86CB-6589C9E028FB/5xC8JQocRpussCJ_E1ClVQ
  • MP does have an AppleScript dictionary but I can’t find any reference to an x-callback-url scheme

I use Tinderbox for high level project management, Merlin Project for scheduling and time blocking work and Things 3 for managing low level tasks, so connecting items within each of these with Hook would be great. Merlin will publish tasks to the calendar as events and includes a link back to the Merlin item. It also provides an AppleScript for transferring items between Merlin and Things 3, but this doesn’t transfer a link to the Merlin item.

I hope this helps. I’m not very accomplished with Merlin and very new to Hook so hope these replies make sense!

with best wishes
Claire.

1 Like

Many thanks for the info, @Claire . As long as the AppleScript exposes the name and URL of the item, we will be able to build most of the functionality . It’s on our list of integrations to try to add.

That sounds excellent, Luc. Many thanks.

1 Like

Hi,

+1 Would be happy to see Merlin hooked in, seems everything is available for it. It’s a great piece of software, linking to tasks in Merlin directly would be very valuable.

Thank you!
Vlad

Welcome to the Hook Productivity Forum , @xekc . And thanks again to @Claire for bringing this up.

Merlin does havean AppleScript library, but at this point we can’t seem to get the URL via it. One can get an item’s url by clicking on Edit > Copy URL which returns the like of
merlinproject:///-/6DA7C4F2-1A43-49E2-AA06-90ABB726CE8B/zOpGlD-OTQqYBT_KCoRNaQ

so that can be used in UI scripting.

You can try this Get Address script in Hook > Gear menu > Preferences > Scripts . Press “+” at bottom left, choose the Merlin App, then click on Hook’s Get Address script , paste the following and click save:

tell application "Merlin Project"
	set myselection to selection of first document
	if myselection is not {} then
		set _item to item 1 of myselection
		if class of _item is child activity then
			set _title to title of _item
		else if class of _item is assignment then
			set _title to title of resource of _item
			
		end if
	end if
	
end tell
set the clipboard to ""
tell application "System Events" to tell process "Merlin Project"
	click menu item "Copy URL" of menu 1 of menu bar item "Edit" of menu bar 1
	delay 0.1
	repeat 50 times -- poll clipboard for ~2.5 seconds
		try
			if (the clipboard) is not equal to "" then
				exit repeat
			end if
		end try
		delay 0.05
	end repeat
	
end tell
set _url to the clipboard
return "[" & _title & "](" & _url & ")"

UI scripting is not as reliable as other forms of automation like x-callback-url , shell scripts and AppleScript that Hook can also use if an app supports it.

Version 170 of Hook integration adds supports for Merlin Project, an app by Project Wizards. See Version 170 of Hook software integration: Merlin Project integration - Releases - Hook Productivity Forum

2021-06-30 11:08: I’ve updated this post to refer to the release note topic instead of duplicating it.

2 Likes

This is great news, Luc. Thank you so much. :grinning_face_with_smiling_eyes:

1 Like