QT EXPORT DROPLET

Nebagakid,It seems that you can only export to a ‘file’. Weird! So I wrote this script that will name the exported files ‘target file’ then export via your previous parameters. You would think that one would be able to export and define a name on the fly…It would be helpful as a subroutine to call on with a selection in a movie as the targeted picture export, but the script would have to be modified. It currently just processes pictures. Thanks for the question I have been meaning to fool around with QT scripting!

on open (itemList)
	repeat with x from 1 to count of itemList
		copy item x of itemList to fileName
		if length of (x as text) = 1 then
			set m_name to ("00" & x & ".jpg") as text
		else if length of (x as text) = 2 then
			set m_name to ("0" & x & ".jpg") as text
		end if
		tell application "Finder"
			make file at desktop with properties ¬{name:m_name}
		end tell
		tell application "QuickTime Player"
			activate
			open fileName
			export front movie to (((path to desktop) & m_name) as string) ¬
				as picture using settings preset "Photo-JPEG"
			close front movie
		end tell
	end repeat
end open

Nebagakid,It seems that you can only export to a ‘file’. Weird! So I wrote this script that will name the exported files ‘targetfile’ then export via your previous parameters. You would think that one would be able to export and define a name onthe fly…It would be helpful as a subroutine to call on with a selection in a movie as the targeted picture export, but the script would have to be modified. It currently just processes pictures.
Thanks for the question I have been meaning to fool around with QT scripting!

on open (itemList)
	repeat with x from 1 to count of itemList
		copy item x of itemList to fileName
		if length of (x as text) = 1 then
			set m_name to ("00" & x & ".jpg") as text
		else if length of (x as text) = 2 then
			set m_name to ("0" & x & ".jpg") as text
		end if
		tell application "Finder"
			make file at desktop with properties ¬
				{name:m_name}
		end tell
		tell application "QuickTime Player"
			activate
			open fileName
			export front movie to (((path to desktop) & m_name) as string) ¬
				as picture using settings preset "Photo-JPEG"
			close front movie
		end tell
	end repeat
end open