Quicktime export: Selecting pop up menu item


try
	tell application "QuickTime Player"
		activate
		tell application "System Events"
			tell process "QuickTime Player"
				
				tell application "System Events" to (keystroke "e" using {command down})
				
				tell window 1
					tell group 1
						get properties of pop up button 2
						--get properties of every UI element
					end tell
				end tell
			end tell
		end tell
	end tell
on error errorMsg number errorNum
	display dialog "Error (" & errorNum & "):" & return & return & errorMsg buttons {"OK"} default button 1 with icon caution
	
end try

How do I set the value of the current menu item of pop up button 2? All my attempts have failed.

_TIA

Hi,

try this:


try
	activate application "QuickTime Player"
	tell application "System Events"
		tell process "QuickTime Player"
			keystroke "e" using {command down}
			tell window 1
				repeat until exists text field 1 -- wait until window is open
					delay 0.5
				end repeat
				tell pop up button 2 of group 1
					click
					click menu item "Movie to AVI" of menu 1
				end tell
			end tell
		end tell
	end tell
on error errorMsg number errorNum
	display dialog "Error (" & errorNum & "):" & return & return & errorMsg buttons {"OK"} default button 1 with icon caution
end try

Great! It works!
Thank you Stefan, You’ve solved my problems more than once!

Is there a way to not activate QT and run it in the background to avoid all the menu flashes? For instance, I will be converting folders of video of old codecs.

[rant] This is Quicktime 7.4 - When is Apple going to update the applescript dictionary for QT for pete’s sakes? Especially in the Pro version.

-TIA

Geoff
USA/France

take a look at the threadcustom export settings at apple mailing lists.

Hope it helps

No. The videos I am converting are coming from many sources and the data rates/formats are all over the map. I’ve never gotten good results from the default settings.

I want to keep everything the same as the original file (data rate, video size, aspect ratio, etc.) - only convert to a MPEG4 or DV, to keep our videos up with modern codecs. Now I question if this is the right approach.

Maybe there is a misunderstanding.

The export function of QuickTime (Pro) is scriptable.
Adjust the settings you want and save it in a settings file.
Then use the export command with your custom settings to export the movie(s).
GUI scripting is not required

I understand you can script with a settings file, but forgive my ignorance. I am a serious photographer, but I have zero video experience…

Background: I have video clips from many cameras and digital recorders (even Digital 8). These clips are mine or have been given to me by family and friends (of my kids). They are in many different formats. Each video have a different data rate, key frame rate, aspect ratio and image size, etc. Will a generic settings file give the best results in all cases? I have had lousy results simply selecting Movie to DV or similar and hitting “Export”. I’ve tried all kinds of settings for 2 days, and nothing comes close to the same quality as the original.

I am moving to France from the U.S. (The house/farm is already bought! C’est facile - Ma belle mére est française). What settings do I use for a whole folder of AVI, MOV files when I want to update all the video to a modern codec, with no noticeable degradation, and make both NTSC and PAL versions?

Thanks for any help.
Geoff

I’m afraid, I’m not a professional video editor either.
I could help you with the script, but not with the ideal settings.

But I think, there are a few video experts in the forum

Thanks, right now, I think I’ll have to put my project on hold because I have no clue what video settings will give the best results. There is too much tweaking to get good quality out of QT. You would think that thousands of dollars in computer hardware and software could at least translate a codec and get similar video quality output vs. input.

Fundamentally, photography is no different than video, but photography is WAY up the curve on usability, results.

Merci et bon chance,

Geoff