On 23/12/2012 02:58, Ted Mielczarek wrote:
> On 12/22/2012 1:02 PM, rvj wrote:
>> its a while since I used the ns interfaces. I want to run
>>
>>    gambit-enumpure < e02.nfg > numerate.txt
>>
>> how do I pass as arguments in nsiProcess?
>>
>> I asssume the file names must be prefixed with c:\\
>>
>> is this correct?
>>
>>
>>
>>
>> ***************************************************************************************
>>
>>
>> var file = Components.classes["@mozilla.org/file/local;1"]
>>  .createInstance(Components.interfaces.nsILocalFile);
>>
>> file.initWithPath("c:\\gambit-enumpure.exe ")
>>
>> var process=Components.classes["@mozilla.org/process/util;1"]
>> .createInstance(Components.interfaces.nsIProcess);
>>
>> process.init(file)
>>
>> var args = ["<","c:\\e02.nfg",">","c:\\numerate.txt"]
>>
>> process.run(true,args,args.length)
>>
>>
> This will not work. the < and > are only parsed by a shell, they are not
> true commandline arguments. nsIProcess does not run its arguments
> through a shell, so you can't redirect things that way. I don't think we
> have any platform support for running processes and redirecting their I/O.
> 
> -Ted

Can you run a shell script using nsiProcess? Or even the shell (cmd,
bash, etc) itself?

Phil

-- 
Philip Chee <[email protected]>, <[email protected]>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to