Using Hook with Drafts
Drafts is a popular document capture and editing tool by Agile Tortoise.
Hook enables you to link Drafts documents to and from anything that is also linkable.
Copy Link, Copy Markdown Link and Hook to Copied Link
By default, Hook’s Copy Link
and Copy Markdown Link
in Drafts return links of the form drafts5://
. You can paste those links anywhere. You can even use them on your iPad or iPhone.
Hook to New > Drafts
You can use the Hook to New
command to create a new Drafts item that is hooked (bidirectionally linked) to the current resource.
The built-in Hook to New
> Drafts script requires the latest version of Drafts .
If you are using an earlier version of Drafts that does not have sufficient automation for our new Hook to New
implementation, you may use this in Hook > Preferences > Script Editor tab :
tell application "Drafts" to activate
set the clipboard to "$title"
tell application "System Events" to tell process "Drafts"
click menu item "New with Clipboard" of menu 1 of menu bar item "File" of menu bar 1
end tell
--without this weird second activation Drafts won't actually create the new note
tell application "Drafts" to activate
set the clipboard to ""
tell application "System Events" to tell process "Drafts"
click menu item "Link" of menu 1 of menu item "Copy" of menu 1 of menu bar item "File" of menu bar 1
end tell
delay 0.2
get (the clipboard)
“Hook” tag to Drafts items
When you create a new Drafts document using Hook to New
, Hook will apply a “Hook” tag to it. That allows you — on Mac, iPhone or iPad — to search for every task or project that you’ve created with Hook to New
. Handy!
This is an introductory feature that will be revisited. Currently these tags are not added on linking, nor are they deleted automatically.
If you would like the tag name to be something different, From Hook > Preferences > Script Editor tab > Drafts > New Item tab script, just change
Tags:{"Hook"}
to use whatever “tagName” you’d like.
If you don’t like this feature, just delete :
Tags:{"Hook"}
from that script.
Compare:
- Scripts to Apply & Sync a DEVONthink “Hook” tag — and More DEVONthink Goodies – Hook.
- Script to Apply a Hook Tag to OmniFocus tasks — Hook Productivity Forum
Search for Drafts Hook-bookmarks
To find Drafts items you’ve processed with Hook, simply
- invoke Hook
- enter search mode (with ⌘F or a click)
- type:
url:drafts5
and hit the return key
Your Drafts bookmarks will show up in the search results.
See also…
Drafts is discussed and illustrated elsewhere on this website. To find out more:
About this page
Page last updated for Hook 2.1 scripts version 142.