in reply to Automating QuickTime Movies To Streaming

All,
I had a private conversation with BrowserUk about how all the examples using notepad worked fine but QT Pro failed miserably. He was gracious enough to write some code that worked for him. His solution simplified the process greatly using the following techniques

This meant that I had to two things - write a wrapper routine to call this script and set up QT Pro with the settings to remember for each export. The following is BrowserUk's code modified for my purposes.

#!/usr/bin/perl use strict; use warnings; use Win32::GuiTest qw[SendKeys WaitWindow FindWindowLike SetForeground +Window]; my ($src_file, $tgt_file, $title) = @ARGV; ## Start QT system(1, 'C:\Program Files\QuickTime\QuickTimePlayer.exe', qq["$src_f +ile"]); ## Delete any existing file by that name!!! unlink $tgt_file; ## Locate the window my $wid = WaitWindow("^$title", 2); die "Couldn't find QT" unless $wid; ## Make sure it is on top SetForegroundWindow($wid); sleep 1; ## Open the export dialog SendKeys "%FE"; sleep 1; ## Fill in the name and Save ## Assumes the dialog has remembered ## the appropriate settings for output format etc. SendKeys $tgt_file . "%S", 50; sleep 1; ## Sleep whilst the Export progress window is displayed sleep 1 while FindWindowLike(0, "^Progress"); ## Make sure it is still the active window SetForegroundWindow($wid); sleep 1; ## And exit SendKeys "%Fx";

Cheers - L~R