Back to Notenik Docs


The Notenik Knowledge Base

11. Integration ↑

11.2 APIs for Hookmark Integration

Notenik now has some minimal AppleScript support, developed specifically to allow integration with the Hookmarkmark app.

AppleScript Commands

The following AppleScript commands are available.

Sample Scripts

Following are examples of how these commands might be used to enable Hookmark integration.

Get Address

The following script might be placed beneath the Get Address tab in the Scripts section of Hookmark Settings.

tell application "Notenik"
	if HasSelectedNote then
		set theTitle to GetSelectedNoteTitle
		set theUrl to GetSelectedNoteBacklink
		return "[" & theTitle & "](" & theUrl & ")"
	end if
end tell

This script allows Hookmark to ask for the Title and the Backlink (see Custom URL Scheme) of the last Note to be selected. This information then allows Hookmark to later communicate with Notenik in order to pull up that same Note.

New Item

The following script might be placed beneath the New Item tab in the Scripts section of Hookmark Settings.

tell application "Notenik"
	return AddNote title "$title" link "$user_link" tags "hook"
end tell

This script also returns the backlink to the Note of interest.

Tips for Hookmark Integration

You will want to make sure the Timestamp field is included on any Collection you wish to use with Hookmark. This field allows Hookmark to reference a Note even if it has been renamed.

Also note that, when Hookmark communicates with Notenik, it will get info and add info to the frontmost Collection, if you have more than one open.


Next: 11.3 Actions for Shortcuts