Hook integration scripts v. 86 supports Keep It by Reinvented Software

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 to @rwread for initially requesting this, @danieljomphe for feedback, and more recently another Hook user via email.

2 Likes

not a good one. It was an oversight. Thanks for pointing it out!

No obvious evidence of Keepit in 86 – perhaps I’m missing something ?

17

54

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.

1 Like

Got it. Thanks.

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).

1 Like

Thanks, for catching that, Rob! We subsequently fixed the script based. version 89 (2019-11-20) includes it. Sorry for delay in responding to this.

we’re now at v. 92. We will publish the script updates this week-end.

1 Like