Quicktime annotations - can't access title

Hello.

I have another Quicktime annotations question: Any idea why I can’t access the “title” annotation? The ultimate context is more complicated, but the following two simple scripts will not work. If I change the annotation to anything else (album, artist, information, description, etc.) there are no problems.

tell application "QuickTime Player"
	tell front document
		get full text of annotation "title"
	end tell
end tell

This script gets this error message:
QuickTime Player got an error: Can’t get annotation “title” of document 1.

set annot_title to "title"
tell application "QuickTime Player"
	tell front document
		set full text of annotation "title" to annot_title
	end tell
end tell

This script gets this error message:
QuickTime Player got an error: Can’t set annotation “title” of document 1 to “title”.

Any ideas?

Thanks,

  • Bruce

Hi Bruce,

Maybe you should first check, which annotations are available for the current movie:


tell application "QuickTime Player"
	tell front document
		get name of every annotation
	end tell
end tell

When I execute the above code with a movie found on my hard drive (named “QuickTime 4 Sample Movie”), then I get the following result:


{"Full Name", "Copyright"}

Now I can get more information with code like follows:


tell application "QuickTime Player"
	tell front document
		get full text of annotation "Copyright"
	end tell
end tell
-- returns "© 1999 Apple Computer, Inc."

And I can also set this available info:


tell application "QuickTime Player"
	tell front document
		set full text of annotation "Copyright" to "@ 1999 Martin Michel Inc."
		delay 1
		get full text of annotation "Copyright"
	end tell
end tell
-- now returns "@ 1999 Martin Michel Inc."

So I guess the annotation “title” might not be availabe for your movie.

Hope this helps!

That was very helpful.

It turns out that the annotation that is labeled “Title” in the Quicktime properties window is actually called “Full Name” for scripting purposes.

Thanks,

  • Bruce