Joy, StefanK, thank you both SO much for your help!! StefanK, I ended up being able to use your method perfectly. Joy, I’m sure yours works just as well but I don’t think I made myself 100% clear as the specifics of what I was doing. Here’s an explanation, just in case someone else finds this thread and needs to perform the same operations.
I used a Tascam multitrack recorder while recording production sound for a film. This recorder records 4 discreet channels of audio (1.wav, 2.wav, 3.wav, 4.wav). If there is a sort order, I suppose it would be by name since 1-4 all have the same date and duration. The recorder also timestamps the parent folder with the year, month, date, hour, minute, second (121012101628).
I do the post-production audio with Pro Tools. I want to bring in this 4-channel file onto one audio track, for easy editing and easy file renaming. The way to do this within Pro Tools is to put it on a 4-channel surround track; LCRS (left, center, right, surround). So, I imported the newly renamed audio files into Pro Tools and dragged them onto an LCRS track.
Once in Pro Tools, I find where the slate is called out (“Scene 42, shot E, take 1” CLAP!) and I’ll press play to hear it. I then run another script, that I just created, for me to easily rename each individual file; as I find what the slate is.
tell application "Finder"
activate
--Display Dialog and Get Input
display dialog "Scene" default answer "##"
--Get Answer & Return Comment
set answer1 to (text returned of result)
--Display Dialog and Get Input
display dialog "Shot" default answer "a.z"
--Get Answer & Return Comment
set answer2 to (text returned of result)
--Display Dialog and Get Input
display dialog "Take" default answer "##"
--Get Answer & Return Comment
set answer3 to (text returned of result)
--put this here in case i wanted to show the clipboard contents (display dialog "sc" & answer1 & " sh" & answer2 & " tk" & answer3)
set the clipboard to ("sc" & answer1 & " sh" & answer2 & " tk" & answer3)
--clipboard contents will show something like "sc3 shE tk4"
end tell
tell application "Pro Tools"
activate
tell application "System Events"
key code 48
--This is how Pro Tools does its "tab to the end of the clip"
key code 48 using {shift down, option down}
--This is how Pro Tools does its "tab backwards to the head of the clip and select"
delay 0.1
keystroke "r" using {command down, shift down}
--This is how Pro Tools does its "rename clip" function
delay 0.1
key code 126
--go to beginning of text field
keystroke "v" using {command down}
--paste clipboard contents
key code 49
--spacebar
key code 52
--enter
end tell
end tell
Thank you, thank you, thank you both! You’ve both helped me save a lot of time and both have helped teach me some more advanced applescripting.
-Ryan