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


_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to