A strange problem with Apple Books

When I try to use hook to copy link to a book in books app, sometimes it works sometimes not, just saying “no linkable item in books”. All these books were added to my books library by “open with”. Can someone help?
My os is Big Sur 11.4 and hook version is 3.1.

Welcome to the Hook Productivity Forum , xenocod, and thanks for asking.

The book needs to be open in its own window, not just selected in the app. Does that do the trick?

I did open it in a separate window. What is annoying me is hook doesn’t work on every book I open, that’s the problem. I checked my automation option in security and privacy panel and found books was not in the list of apps controlled by hook. I tried reinstalling hook and running hook on a book I just opened but it did’s ask for permission to control books.

After some tests, I think maybe hook has a compatibility problem with the newest big sur 11.4 version. I tried hook on another mac with mojave 10.14.6, it worked quite well with books app.
By the way, I find a localization problem. When I run hook with bear, it fails getting address of any note. After I change two menu item text in the script from “Copy Link to Note” and “Note” to “复制笔记的链接” and “笔记” separately (I used the Chinese-localized version of bear), hook can get address of any note again.

1 Like

Thanks for these reports, @xenocod .

correct. We have not localized Hook yet. Many integration scripts deal with German, and some other languages. On the Linkable Mac Apps – Hook page, we mark them like this:

  1. :thinking: : Hook integrates with the app using UI scripting because the app lacks an adequate API for linking (possibly no API).

Normally for UI scripted apps it is a matter of adapting the script to the language in question.

For many apps and some languages, Hook auto-detects the language and adapts accordingly.

I will respond re the Books issue a bit later.


There may be an issue with macOS permissions. For Books linking, you should initially have received a request for screen recording permissions. You can reset them this way:
How do I reset Screen Recording permission on macOS Catalina? - Ask Different.

You can also find prior links to Apple Books by searching for url:ibooks in Hook. Search – Hook

I have tried, but it didn’t work. In fact on another mac with big sur 11.4 hook works well with books app, so I think maybe it was caused by some software I installed. Maybe hook can save its activity log somewhere I can dig into to figure out the reason.

thanks for letting us know.

/Applications/utilities/console.app , then turn on streaming, and search for Hook. that might provide some insights.

I suspect Big Sur is misbehaving on your Mac. On the Michael Tsai - Blog recently there have been round ups of related Big Sur and 11.14 problems: Michael Tsai - Blog - Remaining Issues in Big Sur and Michael Tsai - Blog - macOS 11.4 Breaks Full Disk Access for Helper Tools (not that Hook ↔ Books relies on Full Disk Acc. , it doesn’t.)