How can I open an .exe file as in DOS?
in
Programming Questions
•
10 months ago
Hi I'm Arturo from Peru =)
When I want to open an exe file in DOS and save the output in a txt file, I just write this:
But now working with Processing I want to do the same, so I tried with the open() function:
First this:
Then this, because I thought there was a problem with the slashes:
And finally with backslashes:
None of them seemed to work. The pickit2 programmer has 2 LEDs that blink when the pk2cmd is working with the hardware and it didn't happened at all.
Is there something wrong with the piece of code I'm trying? Is there any other function to pull this off?
I'm new to programming, I'm not 100% sure what I'm doing please I need your help. I also want to open other exe files I created in C/C++. I use PC W7.
Be happy
When I want to open an exe file in DOS and save the output in a txt file, I just write this:
- pk2cmd.exe -PPIC16F628A -GP000-03C >test.txt
But now working with Processing I want to do the same, so I tried with the open() function:
First this:
- String[] params={"D://Arturo//test//pk2cmd.exe","-PPIC16F628A","-GP000-03C",">test.txt"};
- open(params);
Then this, because I thought there was a problem with the slashes:
- String[] params={"D:/Arturo/test/pk2cmd.exe","-PPIC16F628A","-GP000-03C",">test.txt"};
- open(params);
And finally with backslashes:
- String[] params={"D:\\Arturo\\test\\pk2cmd.exe","-PPIC16F628A","-GP000-03C",">test.txt"};
- open(params);
None of them seemed to work. The pickit2 programmer has 2 LEDs that blink when the pk2cmd is working with the hardware and it didn't happened at all.
Is there something wrong with the piece of code I'm trying? Is there any other function to pull this off?
I'm new to programming, I'm not 100% sure what I'm doing please I need your help. I also want to open other exe files I created in C/C++. I use PC W7.
Be happy
1