Jump to content

[CMD] How to delete text


Recommended Posts

Hello, i have a problem, im doing a little text-based game in command prompt, but i dont know how to make the text what was written before delete. Anybody knows how to do it? I attached the .txt file of the game, details in the file. And i need an command in style of "use this 100 times then go on with the next command" too. So if anybody knows, please tell me. Thanks

Hra 2.0.txt

Edited by knize002
Link to comment
Share on other sites


What about CLS?

http://ss64.com/nt/cls.html
As a side note;

I KNOW THAT I COULD DO IT LIKE :
:b
echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%
goto b
BUT IT WONT STOP IF I DO IT LIKE THAT, SO I HAD TO DO IT THAT STYLE.
IF ANYBODY OF YOU KNOWS HOW TO DO LIKE "WRITE IT 100 TIMES THEN GO ON THE NEXT COMMAND" PLEASE TELL ME

it is a simple FOR /L loop

FOR /L %%A IN (1,1,100) DO (
ECHO something
)

jaclaz

Link to comment
Share on other sites

@jaclaz Thanks, i looked over the link you sent, and thats it. I tried it out and it works. Thanks!

(sorry, i messed up, i thought NoelC sent me the link )
 

Edited by knize002
Link to comment
Share on other sites

@jaclaz Ok, so i used %%i for the parameter and it worked. But can i somehow change the speed of it? I wanted it for the "Matrix effect", but its too fast. When i used the infinite looping :a echo ... goto a it wasnt that fast and it created the "Matrix effect" better. But it was infinite. So if i could somehow decrease the speed....

Link to comment
Share on other sites

Ok, so i managed the "Matrix effect". I used the FOR looping, but i used less times in the command, and i stack the command so it went a bit slower. Like this:
FOR /L %%i IN(1,1,20) DO echo %random%....
FOR /L %%i IN(1,1,20) DO echo %random%....
FOR /L %%i IN(1,1,20) DO echo %random%....
FOR /L %%i IN(1,1,20) DO echo %random%....
etc.

Thanks for helping guys!

Link to comment
Share on other sites

Well, you can introduce a delay between the execution of the commands, *any* command without a definite output to the console would do.

Usually a "ping to to self" is used, but to just slow down a little bit a loop, you can also insert another FOR /L loop

FOR /L %%A IN (1,1,100) DO (

echo %random%

FOR /L %%B IN (1,1,10) DO (

echo %random%>NUL

)

)

jaclaz
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...