Working with hook links in applescript -- simple question


I’m somewhat new to Applescript. I’m trying to use hookmark links in a script I’m writing. I use a line of code like this to grab the clipboard contents after having the script execute the hot key to copy the hookmark link:

set hookmarkLink to the clipboard

When I use this variable as I would a string, though, it doesn’t actually contain the URL/link. It just has the title of the bookmark (I guess the “name” in hookmark applescript terminology).

My case is fairly simple. I just want the hook URL (e.g., hook://…) so that I can use it later in my script. Can anyone give me the snippet of code I need to do this? I looked at a few different conversations on this website, but I couldn’t find an answer.

Thank you so much!!!

Hookmark support helped me find a solution (they were EXCELLENT). Here it is in case it can help anyone else:

use framework "Foundation"
use scripting additions

set the clipboard to ""

tell application "System Events" to tell process "Hookmark"
	keystroke "c" using {shift down, control down, command down}
	delay 0.1
	repeat 10 times -- poll clipboard for ~1 seconds. Sometimes setting x to the clipboard might throw exception
			set theUrl to the clipboard
			if theUrl is not equal to "" then
				exit repeat
			end if
		end try
		delay 0.1
	end repeat
end tell
set theUrl to current application's NSPasteboard's generalPasteboard's stringForType:"public.url"
set str to theUrl as string