Set Playback Speed in Quicktime 7

I am COMPLETELY new to Applescript. I am trying to double the speed of a Quicktime 7 movie I have created so that whenever it is played it will play at 2X speed.

I’ve gotten this far but this only works on “Run.” Whereas I need to be able to run the script once and thereafter the movie will play at 200% speed. I am guessing this is quite simple but I am completely new at this.

Thanks!

tell application "QuickTime Player"
	activate
	
	tell movie 1
		set the chosen_rate to 2
		set the chosen_rate to the chosen_rate as integer
		set the rate to the chosen_rate
	end tell
end tell

THANKS!

Works pefectly! I figured it would be simple… I just don’t know Applescript at all.
Thanks a million for your help!

Is there a way to choose the rate from a series of values including negative values if one wanted to slow down the playback?

Thanks

You can use “rate” instead of “preferred rate”. This won’t change the normal playback rate but can used to adjust the playback rate on the fly while the movie is playing.

set theRates to {-2, -1, 0, 1, 2}
tell application "QuickTime Player"
	tell document 1
		set rate to item 1 of theRates
	end tell
end tell

Is there a way to creat a dialogue allowing to choose one among the chosen rates?


set theRates to {-2, -1, 0, 1, 2}

set chosenRate to choose from list theRates
if chosenRate is false then return
tell application "QuickTime Player"
	tell document 1
		set rate to item 1 of chosenRate
	end tell
end tell

Thank you very much