jEdit Community - Resources for users of the jEdit Text Editor
Launching DOS window from jEdit
Submitted by tupperduck on Tuesday, 9 March, 2004 - 02:12
(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.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
 
User login
Browse archives
« July 2014  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
33%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1092
Syndication
file   ver   dls
German Localization light   4.4.2.1   46158
Context Free Art (*.cfdg)   0.31   36717
R Edit Mode - extensive version   0.1   10948
JBuilder scheme   .001   10685
Advanced HTML edit mode   1.0   10402
Matlab Edit Mode   1.0   10269
BBEdit scheme   1.0   10249
ColdFusion scheme   1.0   10237
jEdit XP icons   1.0   9725
XP icons for jEdit   1.1   9667