01-11-2006, 11:56 AM | #1 | ||
Join Date: Oct 2004
Location: Iisalmi, Finland
Posts: 416
|
Hi!
I was nostalgizing with DOS once again, but it seems that I have forgotten more than I believed. So, I create a file called itworks.bat [edit itworks.bat] Now, what I would like to do is to create a list of text that appears and removes the "c:\>" indicator. The text I wrote in itworks.bat is like this: echo off cls IT WORKS! The good think is that the "IT WORKS!" text is printed at the screen, but the "c:\>" Still appears in the screen. I remember doing something with @ mark in old days but I cannot recall anymore. So help this old man! |
||
|
|
01-11-2006, 11:59 AM | #2 | ||
Join Date: Oct 2004
Location: Godmanchester, England
Posts: 850
|
example of what i did once:
Code:
@echo ------------------------------------ @echo -**********************************- @echo - Worms: United And Reinforcements - @echo -******** Multiplayer Menu******** - @echo -**********************************- @echo ------------------------------------ Code:
------------------------------------ -**********************************- - Worms: United And Reinforcements - -******** Multiplayer Menu******** - -**********************************- ------------------------------------
__________________
~Ceramic White PSP Status~ FW: 5.00 M33-6 Memory Stick: 8gb |
||
|
|
01-11-2006, 12:23 PM | #3 | ||
Join Date: Oct 2004
Location: Iisalmi, Finland
Posts: 416
|
I still cannot make the screen completely blank, except for the text that I wan't to appear
|
||
|
|
01-11-2006, 02:14 PM | #4 | ||
Join Date: Oct 2004
Location: Godmanchester, England
Posts: 850
|
isn't the command cls for clearing the screen?
try putting that before i.e. @cls (so it doesn't show execution of the command) @echo ----------------- @echo - example - @echo ----------------- edit- just tried it and it doesn't do that i can't think of any solution at the mo but i hope i helped
__________________
~Ceramic White PSP Status~ FW: 5.00 M33-6 Memory Stick: 8gb |
||
|
|
01-11-2006, 04:39 PM | #5 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
You don't need to add a "@" at the beginning of each line, just start the file with "@echo off" and the subsequent commands will be muted --until you should add a "echo on" line, don't ask me why you'd want to. I'm not completely sure of what you want, is it just to display "IT WORKS!" and then get back to the DOS prompt? If so try this:
Code:
@echo off cls echo IT WORKS! echo. You can find extensive help about DOS batch files, basic stuff like that and advanced features like variables, parameters, "if" sentences, "for" loops, etc. in HELP.COM + HELP.HLP.
__________________
Life starts every day anew. Prospects not so good... |
||
|
|
01-11-2006, 06:33 PM | #6 | ||
Join Date: Oct 2004
Location: Iisalmi, Finland
Posts: 416
|
I tried it like that and it works, but it still gives the c:\> line. Im starting to doubt that this is impossible. I just have memory that it worked back days.
|
||
|
|
01-11-2006, 07:11 PM | #7 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
So you want the prompt to disappear? Why on Earth? Okay that's changed with the "prompt" command, surprisingly enough. Only that it's designed to customize the prompt, but you'll have to figure for yourself if it can make it disappear, here you have the syntax:
http://www.computerhope.com/prompthl.htm Then instead you could make the batch file to show what you appear to want, withouth the prompt, and then get back to it when you press any key. I think this might work: Quote:
__________________
Life starts every day anew. Prospects not so good... |
||
|
|
02-11-2006, 05:14 AM | #8 | ||
Join Date: Oct 2004
Location: Iisalmi, Finland
Posts: 416
|
Just cosmetic option. It would look cool, if the program would give these options and the prompt would not be there. Then there would be command, like "quit" (separate .bat file -> command) that would bring the prompt back. I don't get it why echo off doesn't work in bat file, since it works if you write it in dos manually.
|
||
|
|
02-11-2006, 10:23 AM | #9 | ||
Join Date: Nov 2004
Location: Lisboa, Portugal
Posts: 506
|
<div class='quotetop'>QUOTE(Morrin @ Nov 2 2006, 06:14 AM) [snapback]264916[/snapback]</div>
Quote:
Code:
echo IT WORKS! If you wish to remove the prompt after that, you'll have to use the "prompt" command to make something like this: Code:
@echo off cls echo IT WORKS! echo. prompt - |
||
|
|
02-11-2006, 11:36 AM | #10 | ||
Join Date: Oct 2004
Location: Iisalmi, Finland
Posts: 416
|
Prompt command looks like a good compromise to this. Thanks a lot Shrek!
|
||
|
|