Hello, my applescript knowledge is poor and I can’t find a working example of doing this… I just need to get Hookmark to create a hook on the active document/website/etc. And set that to the clipboard. If it can be done without hookmark flashing up.
tell application "Hookmark"
set theResult to bookmark from active window
if class of theResult is not bookmark then
delay 1
set theBookmark to bookmark by request handle theResult
-- you can get address, path, name from a bookmark
end if
set addr to address of theResult
set the clipboard to addr
end tell
I run it using keyboard maestro - the app referenced in the final paragraph - which can receive variables. KM then sets those variables to clipboard with a few extra bits around the text, and passes it to shortcuts to append to a Drafts document.
But, you could also launch the script through Shortcuts or FastScripts, but I’m not familiar with passing variables from AppleScript onto them. If you haven’t used it yet, keyboard maestro is excellent. It’s like the glue that holds all my automations together.