Select radio button in Save As in Quicktime Player 7

I’m a newbie to applescript. Using Quicktime Player 7 I’m trying to automate “Save As” to select the radio button “Save as a reference movie”

The click checkbox line below is hanging me up. I can’t figure out the index value for tab group and window. For all I know the entire line could be incorrect. The error returned reads error “System Events got an error: Can’t get window 1. Invalid index.” number -1719 from window 1"

activate application "QuickTime Player 7"
tell application "System Events"
  tell process "Quicktime Player 7"
  keystroke "S" using command down --SAVE AS
  key code 124 --RIGHT ARROW
  keystroke "_STEREO"
  tell application "System Events"
  click checkbox "Save as a reference movie" of tab group 1 of window 1
  end tell
  end tell
end tell

I then run a separate script to try to get a read out of the windows info be but it doesn’t return data that’s helpful. I assume that it is index value is “1” since the Save As window drops down and is on top of the only other open window in quicktime.

tell application "System Events" to tell application process "QuickTime Player 7"
properties of window 1
end tell

Any thoughts?

Model: MacPro
AppleScript: 2.6.1 (152.1)
Browser: Chrome 45.0.2454.101
Operating System: Mac OS X (10.9)

QuickTime Player has a :

save reference movie
save reference movie (verb)Save a movie that references multiple versions of another movie to a file (from QuickTime Player Suite)
command syntax
save reference movie to file ¬
using descriptors anything ¬
replacing boolean

Thanks! The coding for this may be a bit over my head. Sorry, I’m truly a newbie. Is there a way to do this via the gui? keystrokes? I realize this is not ideal and can cause problems, but it may be the only way that I’ll be able to create this script.


Maybe it’s my old scholar English which fools me but I don’t find a “save reference movie” command in QuickTime Player Suite.

The only entry returned when I search for the word “save” is :
save‚v : Save a document.
save specifier : The document(s) or window(s) to save.
[in file] : The file in which to save the document.
[as saveable file format] : The file format to use.

Yvan KOENIG (VALLAURIS, France) lundi 19 octobre 2015 18:35:03

Hey there…
Thanks for getting back to me. In Quicktime Pro 7 there is an option when you select File:Save As. At the bottom of the window that drops down you’re given the option to click a radio button Save a reference movie. I can’t find the index value of the window that pops down after “save as” is selected. It’s here that I need to automate the selection of the radio button Save a reference movie.

It’s the kind of thread which I dislike.
It starts with a question related to “QuickTime Player” then it switch to “QuickTime Pro”.

Is it so difficult or tiring to think a bit before opening a thread ?

To help you to solve your problem, if it’s not already done, Buy (it’s free) Xcode thru mac App Store.

In its internals (it’s a package) you will find an useful application:

To reach it easily I installe an alias of it on my Desktop.

Run it then execute the needed actions in Quicktime Pro.
The inspector will tell you which are the triggered UI Elements.
I don’t own Quicktime Pro but I’m not sure that what you wrote about is a window, maybe it’s a sheet.

Yvan KOENIG (VALLAURIS, France) lundi 19 octobre 2015 21:00:10

– Try this; works in Mavericks w Quicktime 7 Pro
– Default save in qt7 is to a reference movie

tell application "QuickTime Player 7"
	open file ((((path to desktop) as text) & "") as text)
	save document 1 in file ((((path to desktop) as text) & "") as text) --> reference file

	tell document 1
		save self contained in file ((((path to desktop) as text) & "") as text) --> self-contained file
	end tell
		close every window saving no
	on error
	end try
end tell