Hi! I’m trying to extract the video track from a set of dropped files, close the original and save the new with an added “-v” file suffix to the original file name, to the original folder of the dropped files.
I’m new to this - having issues both with the variable/event handling and the extraction of the content. My first attempt:
on open droppedFiles
tell application "QuickTime Player 7"
activate
repeat with thisFile in droppedFiles
open thisFile
set newFile to name of thisFile & "-v"
tell thisFile
export (track whose name is "Video Track") to file newFile as QuickTime movie
end tell
close thisFile
close newFile
end repeat
end tell
end open
…opens the right file in QT then returns
I then simplified and tried:
on open thisFile
tell application "QuickTime Player 7"
activate
open thisFile
tell thisFile
export track "Video Track" of thisFile to file
end tell
close thisFile
end tell
end open
…which also opens the file in QT then returns
By [correct path] I mean the path of the dropped file.
I clearly need some pointers here. I appreciate any feedback.
Thanks a million,
O
Model: Macbook Pro
AppleScript: 2.1.2
Browser: Firefox 39.0
Operating System: Mac OS X (10.6.8)