Setting vertical offset of text track via applescript

I keep getting errors with this. Here is what I’m trying:


add movie 1
set the offset of track "Text Track" to {0, 180}

It adds the text track fine, but throws an error

“Can’t set offset of “Text Track” to {0,180}. Access not allowed.”

I also tried


add movie 1
set the position of track "Text Track" to {0,180}

The error I get is:

“Can’t make <> of <> “Text Track” of application “QuickTime Player” into type reference.”

Is this possible? I want to set the offset of the text track so it appears below the movie.

Thanks.

  • Pat

A track is a movie element, Pat ” rather than being contained directly by the application.

So, to use a track reference, you also need to specify the movie that contains it:


tell application "QuickTime Player"
	add movie 1
	set position of track "Text Track" of movie 1 to {0, 180}
end tell


Alternatively:


tell application "QuickTime Player" to tell movie 1
	add
	set position of track "Text Track" to {0, 180}
end tell


Ha! That worked perfectly. Thanks, Kai!