Exporting a movie times out if movie is long

I am trying to write an applescript which will export a specified movie file in all the available export options… this is working fine for very small movies but with anything larger the applescript applet seems to be timing out…
Using the following snippet of code to wait for the export progress bar to disappear and the movie window to come to the front does not seem to be working for me…

repeat until name of front window is moviename
delay 60
end repeat
this is the code which I am using for exporting…

tell application “QuickTime Player”

set exportlist to {AVI, BMP, DV stream, FLC, picture, Fast Start QTVR Movie, QuickTime movie, MPEG4, QuickTime media link, interframe compressed VR object movie, MPEG2, hinted movie, ThreeGPP, QuickTime TeXML, standard MIDI, text file, AIFF, MuLaw, System 7 sound, wave}

set countervariable to 1
repeat 20 times
	
	set movietype to item countervariable of exportlist
	can export movie moviename as movietype
	
	if result is true then
		export movie moviename to "Movie Export " & suffix as movietype
		
		repeat until name of front window is moviename
			delay 60
		end repeat
		
		log "Export of " & moviename & " as " & movietype & " is complete"
		
	end if
	set countervariable to countervariable + 1
	set result to false
end repeat

end tell

The script is timing out when the export is being performed…any ideas what I am doing wrong here

I think that the line

export movie moviename to "Movie Export " & suffix as movietype

waits until the export is complete before returning control to applescript. (Check this by displaying a dialog immediately after the export to see when it appears.)

If so, then the the AppleScript’s default timeout needs to be set to a value past what it will take the command to execute.ie, something similar to “using a timeout of 10000” (I don’t have my computer in front of me to check on the syntax.)