Programmatically getting the Hook URL of a Finder item

No, the following script still returns the file name and not the Hook URL:

use framework "Foundation"
use scripting additions

tell application "Finder"
	activate
	tell application "System Events"
		--activate Hook
		keystroke space using {command down, shift down}
		delay 1
		--Copy Link 
		keystroke "c" using {command down}
		delay 1
		--set the clipboard to (do shell script "pbpaste")
	end tell
end tell
return the clipboard

If the line “set the clipboard to (do shell script “pbpaste”)” is part of the executable code then the result is a Hook URL.

Anyway, I hope that in the future Hook will provide full scripting support (and not only for accessing its database) for itself! Then all the “hacks” that I used in the script for getting the Hook URLs of a Finder selection would not be needed and I would be able to get these and others from any other compatible app using a simple loop.