Script to Export Freeze Frames from QuickTime?

Hello. I was wondering if any of you guys might know how to write a script for a droplet where you could drop multiple QuickTime movies or a folder of Quicktimes and then have it open the movies and prompt you to select a frame, or pause on a desired frame and then make a freeze frame / still image of that frame… for each QuickTime movie. Then it exports those stills back in the source folder.

And I might be able to stumble my way through this next part but any advice would be greatly appreciated…

I’d like to then make an index html file that once uploaded online would be a page of all the still images. Those stills would just be thumbnail links to the original QuickTimes the stills were made from.

Make sense at all? I’m really new at all this, so any help would be amazing.

THANKS! -Colin.

Hi,

try this, you can drop files and folders or choose folders, when you run it.
After specifying the frame you have to switch back to the script (runner)


on run
	choose folder with prompt "Change video files from these folders:" with multiple selections allowed
	open (result)
end run

on open droppedItems
	tell application "QuickTime Player"
		activate
		close every window
	end tell
	
	repeat with thisItem in droppedItems
		set {folder:Fo, package folder:Pa, kind:Ki} to (info for thisItem without size)
		if Fo and not Pa then
			tell application "Finder" to set theFiles to (files of thisItem whose kind is "QuickTime Movie")
			repeat with thisFile in theFiles
				processFile(thisItem as text, thisFile as alias)
			end repeat
		else if Ki is "QuickTime Movie" then
			tell application "Finder" to set parentFolder to container of thisItem
			processFile(parentFolder as text, thisItem)
		end if
	end repeat
end open

on processFile(_folder, _file)
	tell application "QuickTime Player" to open _file
	display dialog "select a frame and press 'Continue'" buttons "Continue" default button 1 with icon caution
	set {name:Nm, name extension:Ex} to info for _file
	if Ex is missing value then set Ex to ""
	if Ex is not "" then set Nm to text 1 thru ((count Nm) - (count Ex) - 1) of Nm
	tell application "QuickTime Player"
		try
			export front document to (_folder & Nm & ".pict") as picture
		on error errorMsg number errorNum
			display dialog "Error (" & errorNum & "):" & return & return & errorMsg buttons "OK" default button 1 with icon 1
		end try
		close front document
	end tell
end processFile

Never mind… my mistake. It worked once i saved the script as an application.

Thank you very much for your help, I really appreciate it! -Colin.