Hooking from mind maps

Does anyone use iThoughtX, MindNode or Diagrams with Hook? They’re in the list of linkable Mac apps, but I can’t get a link to specific elements, only to the diagram as a whole.

The use case is that I have some legal work to do and want to flow chart/ mind map what needs doing — light weight project planning. I was hoping to be able to hook elements/ nodes in the diagrams to relevant documents and other information (contact cards and calendar events in particular), but either I’m doing something wrong or it can’t be done.

Both iThoughtsX and MindNode will let me save a link pasted from Hook, but only one link per node and not a proper bi-directional hook.

Any help gratefully received!

2 Likes

Well, nobody has replied so far, but I’ve played around quite a bit more with iThoughtsX and it seems that its Edit → Copy as … → Link will give you the URL of the selected topic, which Hook then use in Hook to Copied Link. Selecting a topic and then invoking Hook, which I’d expect to give the URL of the topic, just gives you the URL of the document. The result is that you can hook an entire map to another file, or, using iThoughtsX copy as link to get the URL but no Hook, hook a file to a topic; but you can’t hook a topic to a file. There’s something wrong there.

Sorry, I just saw your post. I’m in the same position as you: I’d love to use iThoughtsX or MindNode (my favorite).

I’ve cobbled together (or copied from this forum? can’t remember) a bit of code for iThougthsX. Put it in the “Get Adress” part of the scripts

set the clipboard to ""
delay 0.1
activate application "iThoughtsX"
tell application "System Events"
	tell process "iThoughtsX"
		#get url
		click menu item "Link" of menu 1 of menu item "Copy as" of menu 1 of menu bar item "Edit" of menu bar 1
		repeat 30 times
			try
				set myUrl to (the clipboard)
				if myUrl is not equal to "" then
					exit repeat
				end if
			end try
			delay 0.1
		end repeat
		#get title
		set the clipboard to ""
		delay 0.1
		click menu item "Copy" of menu 1 of menu bar item "Edit" of menu bar 1
		repeat 30 times
			try
				set myText to (the clipboard)
				if myText is not equal to "" then
					exit repeat
				end if
			end try
			delay 0.1
		end repeat
		set n to count of paragraphs of myText
		if n is equal to 0 then
			set firstLine to myUrl
		else
			set firstLine to item 1 of paragraphs of myText
			set len to the length of firstLine
			if (len > 256) then
				set firstLine to text 1 thru 255 of firstLine
			end if
		end if
		return "[" & firstLine & "](" & myUrl & ")"		
	end tell
end tell

It will allow you to get a link to the specific node inside iThoughtX. I think you’ll find it does what you need it to.

1 Like

@seishonagon Thanks! Your script works just fine. @LucB Maybe this could be added to the default installation? I presume I didn’t see iThoughtsX in the list of applications to the left of the scripts preference pane because everything else worked “out of the box” without scripting.