Apple Notes App and Hook
Due to problems with Apple’s Notes app’s AppleScript, as of Hook 1.5, when you invoke Hook in Apple Notes, you will first be presented with a dialog box warning you of issues with the integration.
If you do wish to continue using Hook with Apple Notes, you can proceed through the dialog box. You can even delete the dialog box message as described below.
As a bit of historical background, after the release of macOS 10.15, we removed Apple Notes from the list of supported apps. We discussed the issues with Apple Notes automation in Hook’s release notes, on the Hook forum, and in Hook help pages. See Hook and macOS 10.15 (Catalina) Notes App.
But with Hook 1.5 we’ve taken the extra step of presenting this dialog box. It may be helpful even for macOS 10.14 users to realize that automation with macOS 10.15 is currently even more limited than with 10.14.
Rationale for these changes
First, macOS 10.15 introduced significant problems with Apple Notes’ AppleScript. We worked around the issues as well as is possible. We logged bugs with Apple but have not heard back from them. Nor have they fixed the issues.
Second, as we discussed last year, even with macOS 10.14, there are conditions under which Apple does not maintain the integrity of its own note identifiers. Given Apple’s lack of responsiveness to macOS 10.15 issues, we are not optimistic that they will fix the 10.14 issues either.
We’d rather avoid a situation where users create many links that will fail when they update to macOS 10.15, or disable/re-enable iCloud Notes.
How to re-enable Hook with Apple Notes
If despite these issues you would like to continue using Hook with Apple Notes, you can delete the warning from the Apple Notes entry in the Scripts pane of Hook’s Preferences window. Here is how:
- Open Hook’s Preferences window ( ⌘,).
- Click on the Scripts tab.
- Scroll down to and select the Apple Notes script.
- Click on the Get Address tab.
- Delete everything in that tab above
If you make a mistake, you can get Hook’s default script back by clicking on the “-” symbol at the bottom left of the Scripts tab. That effectively removes your “override” of the selected integration script.
New item (to
Hook to New > Notes item), there is this code.
Work-arounds and other alternatives
hook://search links (handy fallback!)
If you do want to stick with Apple Notes, there are ways to link to and from your notes with Hook, without using “hooks” (bidirectional Hook links).
- To link from a note to some target, simply use
Copy Linkon the target and paste it in the note, rather than “hooking” it.
- To link to a note, you can generate a unique ID, paste it in the note, and then create a Hook hook://search link to it, which you can paste anywhere.
To elaborate on #2:
- To generate an identifier, use the “Copy a New Unique ID” (⌘N) command in Hook’s gear menu; or generate the ID manually. For instance, you could manually create an ID called “About-Hook-1.5.1”.
- Paste that ID in the target note (or anywhere else Spotlight can find).
- With the ID in the clipboard, use Hook’s
Copy a Search Link from Clipboardcommand. This this will create a hook://search link that when clicked will cause Hook to search for the note. In our example:
- Paste that link (
hook://search/?q=About-Hook-1.5.1) wherever you want to refer to this note.
- Click on the link as you would any other link. Or copy and paste the entire link in Spotlight or a launcher (like LaunchBar or Alfred).
That’s handy for linking to and from apps that lack adequate automation. As long as the app’s data are indexed by Spotlight, the trick should work. If there’s more than one hit, Hook’s invocation of Spotlight will find them all.
Access Apple Notes in a web browser
Another approach is to use a web browser to access your Notes from iCloud
https://www.icloud.com/notes. All of Hook’s functions work with Notes in a web browser.
Use other note-taking apps
There are many other great note-taking apps to choose from whose notes can reliably be linked and sync to iOS.