[Done] Drafts integration

Would be great to be able to Hook in Drafts notes.

3 Likes

Thanks for asking!

I assume you mean: Drafts. Where Text Starts. | Drafts. I see they now have a JavaScript interface (their forum: Latest Scripting topics - Drafts Community). Super!

I’ve logged CSA-Issue3097 for this one. We will do it (or ask for extra scripting if they don’t meet our scripting requirements, which are very easy/minimal).

I’m looking forward to it.

I am using the following custom scripts for Drafts:

Get Name (uses the first line of the selected Draft as the name):


tell application "System Events" to tell process "Drafts"
	click menu item "Contents" of menu 1 of menu item "Copy" of menu 1 of menu bar item "File" of menu bar 1
set myText to the clipboard
set firstLine to item 1 of paragraphs of myText
get firstLine
end tell

Get Address:


tell application "System Events" to tell process "Drafts"
	click menu item "UUID" of menu 1 of menu item "Copy" of menu 1 of menu bar item "File" of menu bar 1
end tell

get "drafts5://open?uuid=" & (the clipboard)

3 Likes

We’ve updated the Script server , adding Drafts support.
Hook > Preferences > Script Editor tab

Enjoy :slight_smile:

FYI, I have posted a related topic here: Updates regarding Drafts integration - Discussion & Help - Hook Productivity Forum.