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.
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.
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.
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.
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.