hello
I am trying to write a script that will remove the video component of quicktime files and save it as self contained audio only. Ive used some code i found on this site to nock togeather the code below. I havent got the syntax correct for save movie as selfcontained. quicktime hangs with a (type discriptor mismatch)
any ideas?
thanks
james
set myFolder to (choose folder with prompt "Select a folder containing only video files:")
tell application "Finder" to set theFiles to every item of myFolder whose kind is not "folder"
tell application "Finder"
if not (exists folder "Converted" of myFolder) then
set convertedFolder to (make new folder at myFolder with properties {name:"Converted"})
else
set convertedFolder to (folder "Converted" of myFolder)
end if
set convertedPath to (convertedFolder as string)
end tell
tell application "QuickTime Player"
activate
close every movie saving ask
repeat with myMovie in theFiles
tell application "Finder" to set currentName to the displayed name of myMovie
set newName to currentName
open myMovie
set currentMovie to movie 1
try
save movie movie 1 in file (convertedPath & newName) as self contained
close currentMovie
on error theErr number errNum
display dialog "Error #" & errNum & " - " & theErr as string
end try
end repeat
end tell