I’m trying to link a DEVONthink item to an OmniFocus item via AppleScript, but when I try the hook command to hook the two bookmarks, I get an error that Hook can’t get bookmark id. What’s odd is that it’s always the second bookmark in the hook command that causes this error regardless of whether it’s DT or OF. In other words, with the item URL for my DT item in the variable dtLink and the task URL for the OF item in ofLink, I do the following:
tell application "Hook" set myBookmark to make bookmark with data dtLink set myBookmark2 to make bookmark with data ofLink hook myBookmark and myBookmark2 end tell
I get the error “can’t get bookmark id” followed by the link for myBookmark2. If I swap myBookmark and myBookmark2 in the hook command, I still get the error on the bookmark after the ‘and’.
What am I missing?