Hook to new, via applescript


I’m pretty sure this is possible, but I couldn’t work it out.

I’d like to be able to automate “Hook to New” to a specific app. For example, I’d like to be able to press a button on Keyboard Maestro and do a “hook to new” omnifocus task.

The easiest way feels like using Applescript, but I couldn’t see a “hook to new” item in the Applescript dictionary.

What would be the best way to do this?



I’d love to be able to do this from Applescript. Is it possible?


You can create new bookmarks and link them like this:

I don’t know if there’s a convenience method to do it more easily.

sorry for the delay in responding. Hook’s API is meant to provide the building blocks. Hook to New can be assembled from the building blocks.

1 Like

Apologies for the delay replying!

I think the major advantage of hook is its huge variety of scripts for integrating with individual products like OmniFocus.

What I’m trying to do is programatically link something (for example, a DevonThink document) to an OmniFocus task, with one button press.

This can be done in many keypresses / clicks (e.g. open hook, do Hook to New, scroll down, find Onifocus in the list) but isn’t automation friendly.

It sounds from your reply as if I can use the building blocks and existing hook integrations to do this with Applescript. Could you point me to a guide?

A great starting point would be to hook any hookable item to an Omnifocus task; but ideally this would be easy to adapt to any item in the Hook to New list.

1 Like