Hi I wonder if somebody could help me please, I want to to get this script to repeat so i don’t have to set a file name each time. If it just numbered each part sequentially that would be great.
tell application "QuickTime Player"
activate
try
if not (exists movie 1) then error "No movies are open."
stop every movie
repeat
display dialog "Enter the number of seconds to select:" default answer "" buttons {"Cancel", "Cut"} default button 2
copy the result as list to {requested_seconds, selection_method}
try
if the requested_seconds is not "" then
set the requested_seconds to the requested_seconds as number
exit repeat
end if
end try
end repeat
repeat
if the selection_method is "Cut" then
set the current_time to the current time
select movie 1 at current_time to (current_time + (requested_seconds * (time scale of movie 1)))
end if
cut movie 1
make new movie
paste movie 1
set the movie_name to the name of movie 1
if (can export movie 1 as QuickTime movie) is true then
set the new_file to ¬
choose file name with prompt "Enter a name and choose a location for the new file:" default name movie_name
export movie 1 to new_file as QuickTime movie using settings preset "DSL/Cable - Medium"
close movie 1 saving no
else
error "This movie cannot be exported."
end if
end repeat
on error error_message number error_number
if the error_number is not -128 then
beep
display dialog error_message buttons {"Cancel"} default button 1
end if
end try
end tell
TIA.