Open a document without changing application focus

Hi,

I’m trying to build a script to run through a batch of movies and transcode them using QuickTime Player 7. It does this well, but every time it opens the next file in the list, it brings QuicTime Player 7 to the foreground and interrupts the user–it gets a little annoying. Is there a way I can open a document without bringing the app to the foreground?

Thanks,
Bill

tell application "QuickTime Player 7"
	activate
	close windows
end tell

tell application "Finder"
	activate
	set sourceFolder to choose folder with prompt "Select the source folder"
	set theseMovies to items of sourceFolder whose kind is "QuickTime Movie"
	set destFolder to choose folder with prompt "Select the destination folder"
end tell


tell application "QuickTime Player 7"
	
	repeat with thisMovie in theseMovies
		
		open thisMovie
		
		set thisOne to document 1
		set ThisOnesName to name of thisOne
		set dest to POSIX path of (destFolder) & ThisOnesName
		
		with timeout of (30 * 60) seconds
			export thisOne to dest as QuickTime movie using most recent settings
		end timeout
		
		close thisOne
		
	end repeat
end tell



set sourceFolder to choose folder with prompt "Select the source folder"
set destFolder to choose folder with prompt "Select the destination folder"
tell application "Finder" to set theseMovies to items of sourceFolder whose kind is "QuickTime Movie"

repeat with i from 1 to (count of theseMovies)
	
	set thisMovie to (item i of theseMovies) as alias
	with timeout of (30 * 60) seconds
		tell application "QuickTime Player 7" to export thisMovie ¬
			to destFolder as QuickTime movie using most recent settings
	end timeout
	
end repeat