I have developed an applescript that when I insert a DVD prompts me for DVD info and encodes the titles accordingly for a TV Show by using the Handbrake CLI and generating a long series of Handbrake commands concatenated with ; to repeat the command for each title.
First I generate the shell command by looping through for each title and generating the filename and command line and appending it to a variable shell_command. When I am done looping through the titles I execute the following code to run the handbrake commands in order for each title.
tell application "Terminal"
activate
do shell script shell_command
end tell
When I run this code the terminal application opens and pastes in say 5 of 8 commands and will include maybe half of the 6th. I am unsure if I am running into a problem with the terminal “do shell script” command or if there is a string variable length restriction i am unaware of.
Thanks in advance.