accessing multiple Automator variables in a Run Applescript action
I have an Automator app set up with 4 variables feeding into a Run Shell Script with the following code. And it runs perfectly.
/Applications/Adobe\ After\ Effects\ CC/aerender -sound ON -project $1 -comp "$2" -output $3/$4
However, I need to be able to see the progress of the Script while it processes in the Terminal window. So, I'm setting up a Run AppleScript to tell Terminal to run the script, but I'm getting two problems.
code:
on run {input, parameters}
set aVar to item 1 of input
set bVar to item 2 of input
set cVar to item 3 of input
set dVar to item 4 of input
tell application "Terminal"
activate
do script "/Applications/Adobe\ After\ Effects\ CC/aerender -sound ON -project aVar -comp \"bVar\" -output cVar/dVar"
end tell
end run
Problem 1--Either my syntax or method of setting the 4 variables to access the array of 4 input variables is wrong. And I don't know enough about AppleScript to figure it out.
Problem 2-- AppleScript really doesn't like the spaces in "Adobe\ After\ Effects\ CC" even though the Terminal has no problem with it. But it errors out before it even gets to Terminal.
Any help that anyone can give will be greatly appreciated.
Automator-OTHER