Add Markup Annotation to Video via AppleScript

I’ve been trying to find a way to add an annotation to a video via AppleScript. I see the ‘record’ object has an ‘annotation’ attribute (of type record). However the ‘create record with’ command doesn’t accept annotation as part of its properties.

Any pointers would be appreciated.


It’s basically a two step process:

  1. First create a record (plain/rich text or Markdown) that will be the annotation
  2. Set the property annotation of another record which should use the new annotation
tell application id "DNtp"
	set theRecord to selected record 0
	set theAnnotation to create record with {name:"My Annotation", type:txt, content:"The contents"} in location group of theRecord
	set annotation of theRecord to theAnnotation
end tell
1 Like

Works perfectly, thanks!