scripting quicktime

I need to batch process a ton of files.
If I give specific names, It works, otherwise it doesnt
I can batch process renaming files, why not quicktime?
thanks for any help

–this works
on open thefiles
repeat with a_file in thefiles as alias

	tell application "Macintosh HD:Applications:QuickTime Player.app"
		activate
		open file "Macintosh HD:users:shawnbrady:desktop:Beauty Shot 10.mp3"
		export movie 1 to file "Macintosh HD:users:shawnbrady:desktop:Beauty Shot 10.aif" as AIFF using most recent settings
	end tell
end repeat

end open

(*this is what I need

on open thefiles
repeat with a_file in thefiles

	tell application "QuickTime Player.app"
		activate
		open file a_file
		export movie 1 as AIFF using most recent settings
		sound volume 153
	end tell
end repeat

end open

*)

Not sure, but how about getting a file name to give to the export command?

set theFileName to a_file as string
set theNewFileName to theFileName & “.aif”

export movie 1 to file theNewFileName as AIFF using most recent settings

I don’t have QuickTime Pro so I can’t test the Export part.

on open thefiles
	repeat with x from 1 to count of thefiles
		tell application "QuickTime Player"
			activate
			open item x of thefiles
			-- Insert Export Script Here
		end tell
	end repeat
end open

CarbonQuark