Hook uses AppleScript to integrate with apps, but not all apps are scriptable or sufficiently scriptable. Suppose you open a previously saved resource (document or object) in an app and then invoke Hook, but Hook is empty except for saying “No valid resource detected” (at the bottom), then it may be that the app is not yet compatible with Hook. This is either because the app is not (sufficiently) scriptable or Hook would need to be adapted to work with the app’s particular scripting idioms. An easy way to tell if an app is scriptable is to open the app using Apple’s Script Editor app.
If the app is not sufficiently scriptable , please consider contacting the app’s developer and let them know you’d like their app to be compatible with Hook and send them the address of this page (https://hookproductivity.com/help/integration/other-app-developers/).
Hook’s scripting requirements are quite minimal. Nevertheless, third-party app developers are busy; so they will only add the required AppleScript if they know that their users can’t use their app effectively without it.
Example Email to an App Developer
Thank you so much for creating and supporting App Name. It is invaluable to me.
Would you please add the minimal AppleScript support required for App Name to work with Hook? I use the macOS productivity app, Hook, to provide the missing links between my favorite apps. (It links their resource together.)
Hook needs AppleScript support to
- get a name and URL (or other unique identifier) of the frontmost open resource in your app; and
- be able to open this resource later using that same URL/identifier.
For more information, please check out https://hookproductivity.com/help/integration/other-app-developers/
Updating App Name to work with Hook would make it possible for me to more frequently use your app. On the Hook website you’ll see that Hook is already compatible with other apps like yours.
Information for developers
If you are a developer who was directed to this page, possibly by an email very like the template above, here is some information about how Hook integrates with apps, and how to make your app compatible.
Hook works with apps which have persistent documents, resources, or contexts which can be saved and opened or restored.
Hook needs to be able to get the name of your app’s current resource, and a URL/ID for it. It needs to be able to open this resource using that URL/ID. We do not expect Hook to be able to get the name or URL/ID of an unsaved document.
Getting the name
Getting the name of your app’s current resource might mean
– name of the frontmost window
– name of a selected item in a list or menu
– name of an open document
– any of the above, according to the current state of your app
Getting the URL/identifier
Like the name, it should be possible to get the URL of a document regardless of how it is open or selected in the app
The identifier must be unique to the resource, and it should be persistent. If the resource is renamed or moved, it shouldn’t affect the identifier or break the URL.
Opening the resource
It must be possible open or restore the resource with the URL/identifier. If your application has an existing URL scheme and the URL can just be opened, this is very easy to do, but can also be done with just a unique identifier which can be parsed in a script to retrieve the relevant resource.
For examples of how other apps have been integrated with Hook, and how Hook integration happens: Creating Integration Scripts – Hook.
Please don’t hesitate to contact us (firstname.lastname@example.org) if you have any questions. You can also ask questions directly on the Hook Productivity Forum to get our community talking about using your app with Hook.