Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Improved version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Improved version
Authored by: ilikeimac on Sep 18, '08 09:27:07PM
Thanks to suggestions below and some encouraging emails, I present an improved version of the script that doesn't require editing. The script will prompt you to select all of the iDVD projects first, then it will prompt for a folder where all of the disc images should be created. The disc image names will be the name of the project with ".dvdproj" replaced by ".img". I was trying to avoid resorting to shell scripting but it didn't quite happen, so there's some really ugly business going on to build the name of the disc image.
tell application "iDVD"
	with timeout of 0 seconds -- no timeout
		
		set projectstoburn to (choose file of type "BNDL" with prompt ¬
			"Select iDVD Projects" with multiple selections allowed)
		set outputFolder to quoted form of POSIX path of ¬
			(choose folder with prompt "Select Output Folder")
		
		repeat with i from 1 to count projectstoburn
			
			open project path (POSIX path of item i of projectstoburn)
			
			copy quoted form of POSIX path of item i ¬
				of projectstoburn as string to discImage
			set discImage to do shell script "o=" & discImage & ¬
				"; o=${o%.*}; echo " & outputFolder & "/${o##*/}.img"
			start disc image burn path discImage
			
		end repeat
		
	end timeout
end tell


[ Reply to This | # ]