I need a script that tells quicktime to open the second file from a specific folder (in a loop) when a new movie is being saved in that same folder.

the problem is that i don't know how to write the script that says, execute a new action when a new file is saved in this folder.

is there any script for this?

thanks,
Castor


tell application "Finder"
sort (get files of folder sourceFolder) by creation date
set theFile to (item 2 of result) as alias
end tell

tell application "QuickTime Player 7"
activate
open theFile
present document 1
repeat
delay 1
if done of front document then
exit repeat
end if
end repeat
end tell