Version 86 of Hook’s integration scripts supports Keep It from Reinvented Software.
From the Keep It web page:
Keep It is a notebook, scrapbook and organizer, ideal for writing notes, keeping web links, storing documents, images or any kind of file, and finding them again.
We hope Keep It users will enjoy being able to link Keep It items to items inside and outside Keep It with Hook.
Thanks, Rob. that’s a bug: when scripts are updated from the Preferences window (“Check Now” button), the newly downloaded script isn’t visible; requires relaunching Hook to see it. We’ll fix that.
Now that Hook can obtain both name and address with a single script which returns a [name](url) pattern like:
tell application id "com.reinvented.KeepIt"
set xs to selected items as list
if {} ≠ xs then
tell item 1 of xs
if missing value is not it then
"[" & name & "](keepit://link?item=" & id & ")"
end if
end tell
end if
end tell
I am interested to see that your supplied solutions still use two separate scripts – is there a particular reason for doing it that way ?
There appears to be a bit of a logical glitch in the version of the Keepit script which you are using there:
Redundant (erroring) else clause
tell application id "com.reinvented.KeepIt"
set xs to selected items as list
if {} ≠ xs then
tell item 1 of xs
if missing value is not it then
"[" & name & "](keepit://link?item=" & id & ")"
else
"[" & id & "](keepit://link?item=" & id & ")"
end if
end tell
end if
end tell
The expression in the else clause tries to build a markdown link using the id property of missing value
A bit unexpected, and can only produce a run-time error (it can never actually produce a string of any kind) – a missing value can never have an id property (or indeed any other property).