System call not returning result

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Athor
Posts: 11
Joined: July 7th, 2009, 5:18 pm

Hey guys,

I have run into a bit of a problem with the system.callSystem command. I have used it before and its worked fine, but what I am trying to do now is use it to run a command to submit my after effects project to the render queue (qube).

The command is:

Code: Select all

qbsub --name afterEffectsTest2 --cpus 1 --priority 1 --prototype aftereffects --data (=(Project_path=H:/Compositing/episodes/episode99/seq01/afx_projects/testProject.aep)(appversion=9.0)) C:\\Program Files (x86)\\Adobe\\Adobe After Effects CS4\\Support Files\\aerender.exe
My code in javascript looks like this:

Code: Select all

firstJob =  system.callSystem("cmd.exe /c \qbsub --name afterEffectsTest2 --cpus 1 --priority 1 --prototype aftereffects --data (=(Project_path=H:/Compositing/episodes/episode99/seq01/afx_projects/testProject.aep)(appversion=9.0)) C:\\Program Files (x86)\\Adobe\\Adobe After Effects CS4\\Support Files\\aerender.exe \""));
alert(firstJob);
When I run it, the command works and the job gets submitted to the queue but the output from command line doesn't get returned to javascript. The output should be the job number, e.g. something like 5815. But all i get in javascript is blank.

Anyone had similar issues or can anyone help me out?

Thanks
Josh
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Try putting the entire command within quotation marks

Lloyd
Athor
Posts: 11
Joined: July 7th, 2009, 5:18 pm

I have tried that and variations of that and still get the same result. Could it be after effects has an issue with the length of the command or something? If i put a simple dir command in there it works fine.
Athor
Posts: 11
Joined: July 7th, 2009, 5:18 pm

Well I seem to have fixed it. I removed the cmd.exe /c from the beginning of the line, just running the command from qbsub and it works. I now get the job no. returned.

Not really sure why that works but hey, I'm not complaining :p
Athor
Posts: 11
Joined: July 7th, 2009, 5:18 pm

Celebrated too soon =(

It seems that by not using cmd.exe at the beginning the command gets cut off. The same thing happens when I paste it into the Run box, there must be a limit on characters and it gets cut half way through the path to aerender.

So back to square one I guess.
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Hey Athor,

Sorry for the brief reply last time but I was not in front of a computer. Not sure what you've tested last but looking at your command you have some "'s missing. Try this:

Code: Select all

firstJob =  system.callSystem("cmd /c \"qbsub --name afterEffectsTest2 --cpus 1 --priority 1 --prototype aftereffects --data (=(Project_path=H:/Compositing/episodes/episode99/seq01/afx_projects/testProject.aep)(appversion=9.0)) C:\\Program Files (x86)\\Adobe\\Adobe After Effects CS4\\Support Files\\aerender.exe\"");
alert(firstJob);
-Lloyd
Athor
Posts: 11
Joined: July 7th, 2009, 5:18 pm

Hey Lloyd,

That command is still not returning the job id. I have managed to get it working by doing the whole write a batch file to disk and run it that way.

Thanks for the help :D
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

That's what I do with BG Renderer. The truth is windows is a bigger pain when doing the system calls due to having to use the cmd bit. Unix is a lot more straight forward.

-Lloyd
Post Reply