Reputation: 10720
I have a program which I have split into two, separating the interactive from the non-interactive. The interactive edits some parameters which it writes to file, and then optionally runs the non-interactive program using "process.start()". It then "sends" the parameters to the non-interactive program using "process.stdin.writeln()". This all appears to work fine.
The non-interactive program can also be run from the command line. In this situation, the non-interactive program reads the parameters from file.
I need to be able to differentiate between starting the non-interactive program from the command line and starting it using "process.start()".
The code that starts non-interactive program from the interactive program is:
Process.start("dart", ["testpg001.dart"])
Can I add a parameter/argument to that? It doesn't really make sense to make the command-line starting of the program add a parameter/argument.
How can I differentiate from the two methods of starting the non-interactive program?
Upvotes: 1
Views: 583
Reputation: 10720
I found an example on-line:
Process.start("dart", ["testpg001.dart", "xxx"])
Upvotes: 1