Mindmanager MacOS - Integration scripts

Hi,

I just hacked together some integration scripts that are working fine to hook items to individual MindManager map elements.

The name and link are correctly fetched, and the map element opens correctly from within Hookmark. This should keep working correctly as long as the MindManager file is not moved or renamed.

Sidenote on the “Get Name” script:
If the map element to be hooked has child elements underneath, then their names are also added to the clipboard (indented as line 2, 3 etc) when invoking “copy” - this is just the default behavior in MindManager. To correctly display the name of the selected item in Hookmark, the script therefore only retains the first line of the clipboard.

Get Name

try
    tell application "System Events" to tell process "MindManager"
        delay 0.5
        click menu item "Copy" of menu "Edit" of menu bar 1
        delay 0.5
        set clipboardContent to the clipboard
    end tell
-- Split the clipboard contents at newlines and get the first line
    set oldDelimiters to AppleScript's text item delimiters -- Save the current delimiter
    set AppleScript's text item delimiters to {"\n", "\r"} -- Both newline characters just to be safe
    set theTitle to first text item of clipboardContent
    set AppleScript's text item delimiters to oldDelimiters -- Restore the original delimiter
    return theTitle
on error msg
    display dialog msg
end try

Get Address


try	
tell application "System Events" to tell process "MindManager"
delay 0.2
click menu item "Copy as Link" of menu "Edit" of menu bar 1
delay 0.2
set theURL to the clipboard
end tell
return theURL	
on error msg
display dialog msg
end try
1 Like

This is fantastic!

Thank you very much for your contribution, @AW2307 .

We will integrate the script into Hookmark.

1 Like