Script to hook Rems in RemNote

If you’re like me and use RemNote for notes and knowledge management, here’s a script I just wrote that will let you hook Rems. To use it, do the following:

  1. Open Hookmark preferences
  2. Go to the Scripts section
  3. Add RemNote to the list of apps on the left
  4. With RemNote selected in the list of apps on the left, go to the “Get Address” tab
  5. Paste the following script:
tell application "System Events" to tell process "RemNote"

	set theDelay to 0.1

	delay theDelay -- Wait until the Hookmark hotkey is fully released

	-- Copy the Rem
	keystroke "c" using {command down}
	delay theDelay -- Wait for the clipboard to update

	-- Get the copied title from the clipboard
	set theTitle to the clipboard

	-- Copy the deeplink
	keystroke "r" using {shift down, option down}
	delay theDelay -- Wait for the clipboard to update

	-- Get the copied URL from the clipboard
	set theUrl to the clipboard

	-- Format and return the markdown link
	return "[" & theTitle & "](" & theUrl & ")"
end tell

You can fiddle with it as needed, but this version will create a hook using the text of the Rem as the title and the deeplink to open it in the desktop app as the URL. I saw at least one person asking about this a while ago, so hopefully people will find it helpful.

2 Likes

Welcome to Hookmark Forum, @Sean .

Thank you very much for your contribution! We really appreciate it.

We added the script to Hookmark and it is available for Hookmark users to download.

The only thing I made the change to the script is this line:
keystroke “r” using {shift down, option down}

I changed it to
keystroke “r” using {shift down, command down}

That’s the default shortcut for copy reference on mac. I assume that r+shift+option is a customized one. Correct me if I am wrong.

Thank you