Hello all!
I’m very new to this scripting business so forgive my ineptness at this.
I work in media and am constantly having to label video files within quicktime to send off to a client. This is very tedious work when you have 50 video files to do with 24 audio tracks each.
Luckily i found a script online which i have slightly modified and added to over the past few months. But I’ve hit a brick wall.
First of all here is the script for labelling and assigning quicktime audio tracks if anyone is interested in using it:
[b]on open myFileList
-- Allows script to be used in either Leopard or Snow Leopard
-- Sets the name of appID "com.apple.quicktime" --> qtPlayer
tell application "Finder"
set qtPlayer to name of application "QuickTime Player 7"
end tell
-- Makes the target application the active window
tell application "QuickTime Player 7"
activate
repeat with myFile in myFileList
set myMovie to (open myFile)
-- Call on "System Events" for QuickTime Player 7
tell application id "com.apple.systemevents"
tell process qtPlayer
-- Shows Movie Properties
tell menu bar 1
tell menu bar item "Window"
tell menu "Window"
click menu item "Show Movie Properties"
activate
end tell
end tell
end tell
--
select row 3 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 4 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 5 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 6 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 7 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 8 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 9 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 10 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 11 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 12 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 13 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 14 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 15 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 16 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 17 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 18 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 19 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 20 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 21 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 22 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 23 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 24 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 25 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 26 of table 1 of scroll area 1 of window 1
click radio button 3 of tab group 1 of window 1
tell pop up button 1 of row 1 of table 1 of scroll area 1 of tab group 1 of window 1
click
click menu item "Mono" of menu 1
end tell
--
select row 3 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 4 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 5 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 6 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 7 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 8 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 9 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 10 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 11 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 12 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 13 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 14 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 15 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 16 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 17 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 18 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 19 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 20 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 21 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 22 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 23 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 24 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 25 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
select row 26 of table 1 of scroll area 1 of window 1
click radio button 4 of tab group 1 of window 1
tell pop up button 3 of tab group 1 of window 1
click
click menu item "English" of menu 1
end tell
--
tell application "QuickTime Player 7"
activate
get name of every track of document 1
{"Video Track", "Sound Track 1", "Sound Track 2"}
set name of track "Sound Track 1" of document 1 to "TEMPLATE"
set name of track "Sound Track 2" of document 1 to "TEMPLATE"
set name of track "Sound Track 3" of document 1 to "TEMPLATE"
set name of track "Sound Track 4" of document 1 to "TEMPLATE"
set name of track "Sound Track 5" of document 1 to "TEMPLATE"
set name of track "Sound Track 6" of document 1 to "TEMPLATE"
set name of track "Sound Track 7" of document 1 to "TEMPLATE"
set name of track "Sound Track 8" of document 1 to "TEMPLATE"
set name of track "Sound Track 9" of document 1 to "TEMPLATE"
set name of track "Sound Track 10" of document 1 to "TEMPLATE"
set name of track "Sound Track 11" of document 1 to "TEMPLATE"
set name of track "Sound Track 12" of document 1 to "TEMPLATE"
set name of track "Sound Track 13" of document 1 to "TEMPLATE"
set name of track "Sound Track 14" of document 1 to "TEMPLATE"
set name of track "Sound Track 15" of document 1 to "TEMPLATE"
set name of track "Sound Track 16" of document 1 to "TEMPLATE"
set name of track "Sound Track 17" of document 1 to "TEMPLATE"
set name of track "Sound Track 18" of document 1 to "TEMPLATE"
set name of track "Sound Track 19" of document 1 to "TEMPLATE"
set name of track "Sound Track 20" of document 1 to "TEMPLATE"
set name of track "Sound Track 21" of document 1 to "TEMPLATE"
set name of track "Sound Track 22" of document 1 to "TEMPLATE"
set name of track "Sound Track 23" of document 1 to "TEMPLATE"
set name of track "Sound Track 24" of document 1 to "TEMPLATE"
get name of every track of document 1
end tell
-- Check to make QuickTime Player active window before saving
tell application "QuickTime Player 7"
activate
end tell
-- Saves any and all changes then closes all windows
tell menu bar 1
tell menu bar item "File"
tell menu "File"
click menu item "Close"
click menu item "Save"
click menu item "Close"
end tell
end tell
end tell
end tell
end tell
close myMovie
end repeat
quit
end tell
end open[/b]
Now what i really need from this script at this point is to be able to process multiple video files at once, at the moment i have to drag each video file on top of the script and wait for it to finish and then do the next one. Would anyone be able to help me modify this to be able to select multiple files in which it will repeatedly go through a file list one by one until the end of said list?
Many thanks for your help and i hope this script comes in use for someone else as well.
Cheers!