hey all looking for anyone who might have code for quicktime player so that I can code a start and an end like HH:MM:SS and then it would cut that selection.
would anyone happen to have some code related to?
hey all looking for anyone who might have code for quicktime player so that I can code a start and an end like HH:MM:SS and then it would cut that selection.
would anyone happen to have some code related to?
thanks Jacques exactly what I need:
Using your script I’ve modified it to use multiple cut points.
set the_start_list to {"01:55:33", "01:39:35", "01:21:52", "01:03:55", "00:51:02", "00:27:32", "00:09:20", "00:00:00"}
set the_end_list to {"01:57:48", "01:40:54", "01:23:59", "01:04:22", "00:53:55", "00:30:26", "00:14:08", "00:03:18"}
--set the_start to "00:00:00"
--set the_end to "00:03:18"
set counterN to 0
repeat with s from 1 to count (the_start_list)
set counterN to counterN + 1
set the_start to item counterN of the_start_list
set the_end to item counterN of the_end_list
--convert HH:MM:SS to seconds
tell the_start to set My_start to ((text 1 thru 2) * 3600) + ((text 4 thru 5) * 60) + text 7 thru 8
tell the_end to set My_end to ((text 1 thru 2) * 3600) + ((text 4 thru 5) * 60) + text 7 thru 8
set seconds2select to My_end - My_start --selection in seconds
tell application "QuickTime Player"
stop movies
try
tell front movie
if not (exists) then error "No movies are open."
set {time_scale, movie_length} to {time scale, duration}
set {My_start, My_end} to {My_start * time_scale, My_end * time_scale}
if My_end > movie_length then
display dialog "There is less than " & (seconds2select as string) & " seconds to the end of the movie from the current time." & ¬
return & return & "Cut to the end of the movie?"
select at My_start to the movie_length
else
select at My_start to My_end
end if
cut
end tell
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
end repeat
Thanks again