BusyCal in Hook to New?

Here’s a New Item script for Busy Cal. We’re sharing it here before uploading it to Hook’s integration server in case anyone wants to give it a whirl and give us some feedback.

tell application "BusyCal"
activate
open location "busycalevent://new/" & "$title"
end tell
delay 0.5

set startOfURL to "busycalevent://info/"

tell application "System Events"
	tell process "BusyCal"
		set the clipboard to ""
		try
			if enabled of menu item "Copy Event URL to Clipboard" of menu 1 of menu bar item "File" of menu bar 1 then
				-- Item selected
				click menu item "Copy Event URL to Clipboard" of menu 1 of menu bar item "File" of menu bar 1
				set urlFound to false
				repeat 10 times
					set theURL to the clipboard
					if theURL contains startOfURL then
						set urlFound to true
						exit repeat
					else
						-- Clipboard doesn't contain URL of selected item, so try getting clipboard again
						delay 0.1
					end if
				end repeat
				if urlFound then
					return theURL
				end if
			end if
		end try
		if enabled of menu item "Copy Event URL to Clipboard" of menu 1 of menu bar item "Edit" of menu bar 1 then
			-- Item selected
			click menu item "Copy Event URL to Clipboard" of menu 1 of menu bar item "Edit" of menu bar 1
			set urlFound to false
			set theURL to ""
			
			repeat 20 times
				try
					set theURL to the clipboard
				end try
				if theURL contains startOfURL then
					set urlFound to true
					exit repeat
				else
					-- Clipboard doesn't contain URL of selected item, so try getting clipboard again
					delay 0.1
				end if
			end repeat
			if urlFound then
				get theURL
			end if
		end if
		
		-- else item not selected
	end tell
	
end tell

Thank you!