Launching DOS window from jEdit
Submitted by Tuesday, 9 March, 2004 - 02:12
on
(I am new to jEdit, so please bear with me)
I am learning C++ and am using jEdit (v4.1) as my editor of choice. I have noticed that the Console will not run programs requiring user input (e.g. std::cin >> menu_choice;) properly; it just continues through the program without waiting for values. Inconvenient, yes, but nothing major. These same programs function as expected when run from the Windows DOS prompt.
What I am trying to do is create a macro to run such a program in DOS. What I have so far is:
// filename parsing code, blah, blah, blah
runCommandInConsole(view,"System",runDOS);
Which works BUT as soon as the all the values are entered and the rest of the program executes, the DOS prompt window disappears and focus returns to the jEdit Console. It seems that the DOS prompt is not being spawned independently of jEdit/Console.
Looking through the documentation I tried variations using "&" to create a background process and "%detach" to create a separate process. Same result. I also tried the approach in the Launching External HTML Checker script by specifying the actual application path (C:\WINNT\system32\cmd.exe), but that runs DOS within Console (without spawing a DOS window) and I can't figure out how to send commands to it.
SO I guess my questions are:
1) Is there a way to launch the DOS prompt as an independent window?
2) Is there a way to send commands to a DOS process running in Console?
Hope that makes sense.
Thanks.
I am learning C++ and am using jEdit (v4.1) as my editor of choice. I have noticed that the Console will not run programs requiring user input (e.g. std::cin >> menu_choice;) properly; it just continues through the program without waiting for values. Inconvenient, yes, but nothing major. These same programs function as expected when run from the Windows DOS prompt.
What I am trying to do is create a macro to run such a program in DOS. What I have so far is:
// filename parsing code, blah, blah, blah
runCommandInConsole(view,"System",runDOS);
Which works BUT as soon as the all the values are entered and the rest of the program executes, the DOS prompt window disappears and focus returns to the jEdit Console. It seems that the DOS prompt is not being spawned independently of jEdit/Console.
Looking through the documentation I tried variations using "&" to create a background process and "%detach" to create a separate process. Same result. I also tried the approach in the Launching External HTML Checker script by specifying the actual application path (C:\WINNT\system32\cmd.exe), but that runs DOS within Console (without spawing a DOS window) and I can't figure out how to send commands to it.
SO I guess my questions are:
1) Is there a way to launch the DOS prompt as an independent window?
2) Is there a way to send commands to a DOS process running in Console?
Hope that makes sense.
Thanks.