on run {input, parameters} tell application "Finder" set video_files to every file of the target of the front Finder window whose name extension is "mp4" repeat with video_file in video_files set base_name to name of video_file set desktop_folder to path to desktop folder set text_file to POSIX path of (desktop_folder as string) & base_name & ".srt" do shell script "echo '[1]' > " & quoted form of text_file do shell script "echo '00.00.00.000 - 00.00.04.000' >> " & quoted form of text_file do shell script "echo " & base_name & " >> " & quoted form of text_file end repeat end tell return input end run