Hook integration scripts v. 103: Updated Scrivener support

Version 103 of Hook integration scripts is now available.

Previous to this update, Hook supported Scrivener “out of the box” but with linking to entire Books.

This updates the support for Scrivener 3 with finer grained linking. Thanks to a user request for this feature, and initial scripts and ideas from RobTrew.

Scrivener’s AppleScript dictionary is limited in respects relevant to fine-grained linking, so this depends on UI scripting. Users may wish to contact the Literature and Latte support team requesting that they provide better support for identifying the information resources they manage: https://hookproductivity.com/help/integration/other-app-developers/

Hook’s software update / check automatically tries to install the latest integration scripts. A reboot of the app is not required for integration script updates.

i am still on scrivener 2 so i guess it doesn’t work with that version? i am still seeing the whole book link when i invoke hook with scrivener open…

Welcome to the Hook Productivity Forum , @noone.

Correct: the integration assumes Scrivener 3.

i think there must be something fundamental about using hook that i don’t understand. why? because well … i am not very smart :stuck_out_tongue:

so i upgraded to scrivener 3 and when i invoke hook i see the message ‘no linkable item found in hook.’

in HOOK?
shouldn’t it say ‘scrivener’ there?

this is what i call tedium! but i click on learn more and work through the 8 points in the list as to why it doesn’t work

  1. You have not granted accessibility permission
    — nope. i have granted permission and i have disabled it and re-enable it.

  2. The foreground item has not been saved

  • nope. it’s been saved since scrivener save automatically.
  1. The message is a draft email
  • nope
  1. No item is selected, open or loaded in the frontmost window
  • nope

4.1 A palette is open or has the focus

  • nope
  1. UI scripted app and macOS or app language is not yet supported
    — nope. scrivener 3 is (partially?) supported

  2. The app is unsupported
    see 5

  3. You’ve problematically overridden Hook’s integration script for this app

  • nope
  1. System Integrity Protection (SIP) is disabled
  • nope

so where to from here?
oh wait i have thrown my computer against a wall and it no longer works.

Thanks for trying all those steps, and sorry it came to that.

That looks like a bug, which I’ve now logged.

I did a quick test of Hook + Scrivener 3 on Big Sur, and Copy Link from Hook window works. It yields the same URL as Scrivener yields when you choose Copy Document Link. However, Scrivener did not honour its own deep link: It opened the book (which is a good start), but not the specific chapter. But that is not what you’re seeing.

Have you tried a different book , potentially stored elsewhere, to see if it is something with that.

Can you try copying the document link in Scrivener itself.

Is there any reason why the Document Binder would not be visible? Could you try exposing it if it’s not?

I am still on 10.14.6 so…
Binder is exposed. Same message.
Made a new project on the desktop. Same message.
Copy link to document from within Scrivener yields :
x-scrivener-item:///Users/jk/Desktop/hook%20test.scriv?id=4107CA8D-44E1-44AB-8888-CA4B1D05D81B works as expected when I paste it in Notes and click on it — that is to say it opens the correct document in a new split editor which is slightly odd but ok.

But Hook doesn’t show a Copy Link menu item because it doesn’t know I have Scrivener open.

hook test

i.e., the UI language of macOS/Scrivener is English?

yes it is english…

no idea why but suddenly it works.
will investigate further …

oh wow… Great to hear !!