Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: DOS Screen Display

23 Jul 2017   #1
asallwey

XP - 32bit
 
 
DOS Screen Display

I have a simple batch file to run dos programs that help with my machining hobby. But I need to retain the screen display when a program completes because it contains input data and results.

I put a Pause code line following the program which keeps everything on the screen. However, it puts the "Press any key to continue." at the end of the last line displayed, rather than below it. I've tried several versions of echo to no avail.

How can I get the Pause ... below the last line?

Thanks!


My System SpecsSystem Spec
.
23 Jul 2017   #2
dg1261

Windows 7/8.1/10/XP multiboot
 
 

Did you try this?
Code:
echo.
pause
My System SpecsSystem Spec
23 Jul 2017   #3
asallwey

XP - 32bit
 
 

Yes I did, along with @echo echo+ echo= echo; and echo/ which I found on some site.

Another site had the following and I tried it without success.
set NLM=^
set NL=^^^%NLM%%NLM%^%NLM%%NLM%
echo %NLM%%NLM%^%NLM%%NLM%

It's all a matter of looks, I'd like to have it on another line rather following with no space.

Instead of this:
Last line of results with results= 0.059 inPress any key to continue.

This:
Last line of results with results= 0.059 in
Press any key to continue.
My System SpecsSystem Spec
.

23 Jul 2017   #4
dg1261

Windows 7/8.1/10/XP multiboot
 
 

Quote   Quote: Originally Posted by asallwey View Post
Instead of this:
Last line of results with results= 0.059 inPress any key to continue.
What's generating the "Last line of results with results= 0.059 in"? Is it a DOS or CMD function? Or is it a separate program? If the latter, you may need to experiment with some variation of the "start" command (such as perhaps "start /w {other-program}").
My System SpecsSystem Spec
23 Jul 2017   #5
asallwey

XP - 32bit
 
 

It is a 40kb compiled program that someone made. Here is what the program produces. You can see how it would be nice if I could just insert a blank line after the program ends and before the pause.


Attached Images
DOS Screen Display-pause.gif 
My System SpecsSystem Spec
23 Jul 2017   #6
samuria

win 8 32 bit
 
 

So is it an exe or a .bat file you could pipe the output to a txt file ie dir >test.txt then append dir >> test.txt
My System SpecsSystem Spec
23 Jul 2017   #7
asallwey

XP - 32bit
 
 

It is an exe program.
My System SpecsSystem Spec
23 Jul 2017   #8
dg1261

Windows 7/8.1/10/XP multiboot
 
 

Ah, so you're running this in DOSBox ... I don't know enough how DOSBox processes commands under the hood, but I think DOSBox may be a limiting factor.

Your symptoms look a lot like what happens running batch files from a Windows Command Prompt window, where launching an exe from the batch file spawns another thread while the first thread continues processing the rest of the batch commands. The Windows command processor has a special batch command, "start /w", for that situation where you want the batch file to pause processing until the exe finishes and before picking up again with the next step. True DOS, of course, can only do one thing at a time, so it doesn't need "start". But when using a multi-tasking environment like Windows the "start" command may be necessary to pause the batch processing until the exe has finished.

I don't know where DOSBox falls between those two extremes (DOSBox is it's own "operating system" environment, neither DOS nor Windows), but it appears DOSBox does not support the "start" command. If it spawns a second thread but doesn't recognize a "start" command, you may be out of luck. That may just be a limitation of DOSBox.

What are those "?" in the knurling display? Are those user input prompts where the program pauses for you to input something, then displays the next line? And I guess you're calling the batch file from a shortcut that launches DOSBox, runs the knurling program, but finishes processing after the third input field and closes the DOSBox window before you have a chance to read the results?

It's too bad that when the program was compiled the programmer didn't simply end the program by displaying a couple gratuitous new-lines, but as is, probably the best you can do is suppress the "press any key" prompt in your batch file's pause command, ala "pause > nul". That should still pause the screen at the end of the knurling display and wait for you to press any key to close the window, but just without the text prompt.
My System SpecsSystem Spec
24 Jul 2017   #9
asallwey

XP - 32bit
 
 

dg1261,

Excellent!! Excellent! > nul did the trick. It executes the Pause and no prompt.

The ? are for user input. I was running this so much this was easiest.

DOSBox is designed to run old games, not really programs.

Thanks!

Alex
My System SpecsSystem Spec
24 Jul 2017   #10
dg1261

Windows 7/8.1/10/XP multiboot
 
 

Quote   Quote: Originally Posted by asallwey View Post
DOSBox is designed to run old games, not really programs.
Well, old games are also programs, all the same ...

I think the point, though, is that the DOSBox developers had to "reinvent the wheel", so to speak, to develop a platform that could run old programs in Windows, so there may be some behavior that is not completely consistent with neither DOS nor Windows.

Anyway, glad to hear you reached a satisfactory solution.
My System SpecsSystem Spec
Reply

 DOS Screen Display




Thread Tools




Similar help and support threads
Thread Forum
Win 7 Standard Account display screen looks like a Win xp screen
As an admin using win 7 pro 64 bit, I set up a Standard Account. After the account was successfully set up, the new standard account screen opened and displays what almost looks like a win xp display. Not at all what my win t admin screen looks like. An example; the start button actually is labled...
Network & Sharing
Dual Screen - Main Screen on Right, Wallpaper won't display properly
First of all; Thanks to anyone taking the time to read this and help me with my minor issue! I have been running dual screen setup for awhile now and early on I realized that I had to set the monitor on the left to the 'Main Display' so that tiled wide resolution images would span across both...
Customization
Display screen black and blank- is mobile pc display the issue?
I started having issues yesterday, the day after I installed teamviewer a program that is on my iPad also to remotely control the laptop. At first the screen started freezing when I was in the middle of a Java game. So I restarted the laptop only to have it freeze at the main screen (after login). ...
General Discussion
Screen display on laptop offset so not all of screen visible
The image displayed on the screen of my Toshiba Satellite laptop is offset so that not all of the tray at the bottom is visible, and there is about 3/4" of black screen at the right side of the display. https://pbs.twimg.com/media/BRmC8nkCMAECwmw.jpg:large It seems to have coincided with my...
General Discussion
display on screen
I have win 7. on accessing internet ex I get a box stating there was a problem starting c:\users\acc the specified module could not be found. in the top left corner is run dll I would like to clear this tks keith
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:40.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App