Tips: Insert video into markdown notes

Here’s a minor revision which does not depend on the version of macOS/Finder or the localization:

tell application id "DNtp"
	set URLList to {}
	
	repeat with thisRecord in (selection as list)
		set recordName to (name of thisRecord as string)
		set recordType to type of thisRecord
		set recordLink to (reference URL of thisRecord as string)
		if recordType as string is "quicktime" or recordType as string is "«constant ****quti»" then
			if width of thisRecord is greater than 0 and height of thisRecord is greater than 0 then
				copy ("* [" & recordName & "](" & recordLink & ")" & return & return & space & space & space & space & "<video controls=\"\"> <source src=\"" & recordLink & "\"></video>  " & return & return) to end of URLList
			else
				copy ("* [" & recordName & "](" & recordLink & ")" & return & return & space & space & space & space & "<audio controls=\"\"> <source src=\"" & recordLink & "\"></audio>  " & return & return) to end of URLList
			end if
		else if recordType is picture then
			copy ("* [" & recordName & "](" & recordLink & ")" & return & return & space & space & space & space & "![](" & recordLink & ")" & return & return) to end of URLList
		else
			copy ("* [" & recordName & "](" & recordLink & ")" & return & return) to end of URLList
		end if
	end repeat
	
	if URLList ≠ {} then
		set the clipboard to (URLList as string)
	else
		display alert "No items selected."
	end if
end tell
2 Likes