callSystem as a separate process? (WIN)

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Posts: 33
Joined: February 7th, 2005, 7:32 am

October 14th, 2010, 8:04 am

Hello scripters

I'm using system.callSystem to launch a frame-cycler (djv view in my case) but I can't figure out how to launch the application without having AE hanging waiting for me to close the window.

In windows I know that you can use 'start app-path.exe' to launch a new process, but I can't seem to make it work with AE..

The code works, but waits until the viewer windows is closed.

Code: Select all

var imViewer = ((app.settings.haveSetting("test", "imviewerr")))?(app.settings.getSetting("test", "imviewerr")):"";
vpath = imViewer;
viewer = new File(vpath);
    cmd = "cmd /c \""+escapeWin(pathToWinPath(vpath))+"\"";
    viewer = File.openDialog ("Choose an image viewer (like djv view). This dialog will only appear once", "");
    app.settings.saveSetting("test", "imviewerr",viewer.path+"/";
// working call    system.callSystem("cmd /c \"C:\\Program Files (x86)\\djv 0.8.2\\bin\\djv_view.exe\""); 
function pathToWinPath(path){
	str = path.replace(/\//, "");
	str = str.replace(/\//, ":/");
	str = str.replace(/%20/g, " ");
	str = str.replace(/\//g, "\\");
	return str;
function escapeWin(string){
    str = string.replace(/\\/g,"\\\\");
    return str
Any ideas?

Boom boom boom.
Posts: 15
Joined: June 5th, 2010, 7:06 am

December 6th, 2010, 5:32 pm

I believe should try START /B app.exe to do that.
If it doesnt work, just write a batch file in the temp folder via script and then fire it w/ the systemcall

it should work I think
Post Reply