Hooking from mind maps (MindNode or iThoughts X)

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!

3 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.

1 Like

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.

2 Likes

@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.

1 Like

We’re a bit reluctant to replace full AppleScript automation with some that relies on UI scripting. E.g., it would not work in other languages without extra care, and UI scripting is brittle. We could add a wrapper around it I suppose which fell back on document level linking if no link found. If the iThoughts X or MindNode had automation for it, that would be grand !