I’m trying to get an openfl desktop application file (experiment.app) to run a separate executable file (TRTransfer) using the process() command.
I’ve placed TRTransfer in the application’s resources folder - it has no problem pulling text files from this location, so I don’t think it’s a problem with the location of the TRTransfer file.
I’m not getting any error messages, and no terminal windows open, so it’s difficult to see where I’m going wrong here.
var p = new Process("./TRTransfer", );
Any help appreciated, and let me know if I can provide any further details.
var p = new Process(“ls”, ["-l"]);
See where you are
Afraid that just returns “Process” and nothing else, but thanks for the suggestion!
Depends on the target I guess.
From the example:
trace("exitcode: " + p.exitCode());
trace("process id: " + p.getPid());
// read everything from stderr
var error = p.stderr.readAll().toString();
trace("stderr:\n" + error);
// read everything from stdout
var stdout = p.stdout.readAll().toString();
trace("stdout:\n" + stdout);
p.close(); // close the process I/O
Some combination of this has fixed my issue, thanks! I’m generally reluctant to follow tutorials with minimal commenting, but just replacing the “ls” with “./TRTransfer” in the above example seems to do the trick