Introduction: Chat Program

Please vote for me in the Microsoft Code Contest here:

This is no fake, the CMD program that I will show you how to make is a chat program. You can message your friends or family in school or at home!

Step 1: Open Notepad

First, you need to open "Notepad". Just press the Windows button and search notepad.

Step 2: The Code (1)

Now this may seem hard to understand or difficult to comprehend, but it's not. If you don't want to type all of this, just copy paste. There are two programs that need to be in the same folder that we will make. This is the first.

Warning: This is the messenger part of the programs.

@echo off
color 0b

title Chat Messenger

echo Hi, welcome to the chat program!

echo.

set /p username=Enter Your Name:

echo %username% has joined! >> join.dat

:message

set /p message=Say:

goto send

:send

echo %username%: %message% (%time%)>> log.dat

goto message

Now, copy this into notepad and save it in folder. Name the file as messenger.bat

Step 3: The Code (2)

This is the receiver part of the code, save this as receiver.bat in the same folder.

Warning: This is the receiver part!!!

@echo off
color 0b

:read

cls

type join.dat

echo.

type log.dat

echo.

timeout /t 2

goto read

Save in the same folder as the other program.

Step 4: Try Them Out!!! :)

Now just open both programs, type in your name, and say something. Boom! You just made a chat program. Now all you have to do to chat with others is share the folder with them!

Comments

author
Nate Oaks made it! (author)2015-02-28

Sice some of you are having trouble with this, you can download it from this link:

https://drive.google.com/file/d/0B49gQ2qjqc5dcmNqY08zSzFhNXM/view?usp=sharing

https://drive.google.com/file/d/0B49gQ2qjqc5dUDdaTmhuaktTaFE/view?usp=sharing

author
Nate Oaks made it! (author)Nate Oaks2015-02-28

By the way, these are 2 different links. Just open both and have fun!

;)

author
ishu1000 made it! (author)2015-03-29

Which language have you used in this program. please tell .

author
BenjaminF54 made it! (author)BenjaminF542016-08-24

He used note pad in a .bat save

author
Givo_29 made it! (author)2015-10-27

i made this but i found having to have 2 different tabs opened a little annoying so i put it all together:

@echo off

color 0b

title Chat Messenger v1

echo Hi, welcome to the chat program!

echo.

set /p username=Enter Your Name:

echo %username% has joined! >> join.dat

set /p message=Say:

echo %username% -(%time%): %message% >> log.dat

type join.dat

echo.

type log.dat

goto message

:message

cls

type join.dat

echo.

echo.

type log.dat

set /p message=Say:

echo %username% -(%time%): %message% >> log.dat

cls

type log.dat

goto message

Hope it helps for those who found it annoying too.

author
4418biki made it! (author)2015-08-26

how can i run this programe ,??

author
Nate Oaks made it! (author)Nate Oaks2015-08-27

You can download the program's form my links and just click them twice.

author
Anbu8366 made it! (author)2015-07-24

awesome I'm gonna try this

author
MrCombobulouse made it! (author)2015-05-21

Do i need to make the reciever file public?

author
EvolvedAwesome made it! (author)2015-04-15

This is some excellant use of CMD

author
MrCombobulouse made it! (author)2015-04-06

How does it send the message to another computer?

It is a great program. I have not tried it, but i have added some user features, such as username and password protected profiles, admin control, and made the chatting a bit nicer.

Thanks

author
Nate Oaks made it! (author)Nate Oaks2015-04-06

I'm glad that you had some fun with this program, how it works is the messenger makes a file that stores information that has been typed, and the receiver just types it onto the screen.

author
MrCombobulouse made it! (author)MrCombobulouse2015-04-06

Trust me, I all ready have!

author
MrCombobulouse made it! (author)MrCombobulouse2015-04-06

Cool! Do you want to see the modified code at a later date?

author
Nate Oaks made it! (author)Nate Oaks2015-04-06

Sure! Just email them to me at oakdna3@hotmail.com

Be sure to vote for me in the coded creations contest, look for "Chat Program"

author
ishu1000 made it! (author)2015-03-29

I have done it but it is showing
" 'timeout' is not recognised as an internal or extenal command, operator program or batch file. what should i do. help me

author
Nate Oaks made it! (author)Nate Oaks2015-03-30

This is a batch file program. Instead of copying and pasting try the download links. This should fix the problem.

author
ishu1000 made it! (author)2015-03-24

how can i talk to my friends. does it requires Internet connection. please reply on = Ishanblaster1000@gmail.com. this is my email. please help fast.

author
Nate Oaks made it! (author)Nate Oaks2015-03-26

They have to be in your network. Yes it does require Internet.
Sorry I didn't email you, this is just a common question which gets asked by email too many times. To share it you right click press share them specify who you are sharing it with.

author
ishu1000 made it! (author)2015-03-24

How would i run it

author
TheSherlockedTardis made it! (author)2015-03-24

It is great fun, thanks. For those of you who have copied and pasted into notepad, and once you enter your name can't type anything, and the receiver just logs the time endlessly, then look no further for the solution. On the messager file, on the 8th line of coding, where it says ':message set/p', just click before the 's' (in set/p) and press 'enter'. (Don't click after 'e' in message, we don't want the space). Then you are done. If you find you don't want the hyper accurate time, then just delete the (%time%) section, just make sure the >> are the same distance away from the (%message%). Finally, if you don't like blue and prefer classic old school green, then where it says colour at the start, replace the 'b' with a '2', so it says '02'. Hope this helps, and thanks for a great 'ible!
P.S. How do you actually add other people?

author
Nate Oaks made it! (author)Nate Oaks2015-03-24

To add other people, you right click the folder and press share. After that,specify who you're sharing it with on your network, finally click done.

author
edrisamiry made it! (author)2015-03-20

does it need an Internet connection to send/receive? replay here..... idris.amiry@hotmail.com I m waiting for your answer

author
mdtanvira3 made it! (author)2015-03-16

You need to upload more screenshot for a proper post.

Off topic " For games and software visit here " http://www.emuzonebd.blogspot.com

author
sarthak1234567890 made it! (author)2015-03-15

how will you add others on it

author
BrockL made it! (author)2015-03-07

How do you share it with other people on a network? And is this network a internet network?

author
Nate Oaks made it! (author)Nate Oaks2015-03-07

It is an Internet connection, and you share it by right clicking it, go to share, then enter the information of the person you are sharing it with.

author
BrockL made it! (author)BrockL2015-03-09

Thanks.

author
lukemc90 made it! (author)2015-03-06

Really cool program.

author
vektor made it! (author)2015-03-03

Code didn't work from copy/pasting from your 'ible. Some spelling mistakes do exist, so that's probably the problem.

Only got it working when downloaded via the links provided below.

author
mawloch made it! (author)2015-03-01

Awesome! Thankyou.

author
bravoechonovember1 made it! (author)2015-03-01

awesome!!

author
thimoschiltmans made it! (author)2015-03-01

i don't know how this works. can anyone help me?!

author
Nate Oaks made it! (author)Nate Oaks2015-03-01

These programs work together by when you type a message, it creates a file. The the receiver refreshes every 2 seconds and when it does, it takes whatever was placed in the new file and puts it on the screen. It's sort of copy paste.

author
redmarkonthewall made it! (author)2015-03-01

I removed the time stamp like you said and I got it working on one computer currently

author
Nate Oaks made it! (author)Nate Oaks2015-03-01

Great. I hope you like it.

author
roanbuma made it! (author)2015-03-01

Color isnt nessecary, but go for color 02 for the famous "hacker" colors

author
horsebones made it! (author)2015-03-01

it's great to see more code here on instructables.

author
xKOBAYASHIMARUx made it! (author)2015-03-01

Now I am by no means an expert in .bat programming so correct me if I'm wrong but can't you write a couple lines of code that makes the messenger program automatically open the receiver program (or vice versa)? I really like this 'ible by the way! Reminds me of Ender's Game. lol

author
Nate Oaks made it! (author)Nate Oaks2015-03-01

That is actually a great idea, I will try to add that in and make a link to it for downloads.

author
script_coded made it! (author)2015-03-01

Lol :)
Made a program very similar to this one. Though, used a dropox utility for batch to make it more user friendly.
Great i'ble!

author
dondzino1215 made it! (author)2015-02-28

Can u use it over a network or have to be on same computer

author
Nate Oaks made it! (author)Nate Oaks2015-02-28

You can use it over the network as long as you share the folder with whoever is using it. When you share the folder, you are both able to access the files it creates.

author
hp62a made it! (author)2015-02-28

My messenger wont allow me to type once I enter a name, and my receiver says "The system cannot find the file specified" at the top under "username has joined!".

author
Nate Oaks made it! (author)Nate Oaks2015-02-28

You probably weren't actually in the program when you tried typing, it was most likely running in the background, and the receiver part says it can't find the file until you say something in the messenger.

author
Skwurlito made it! (author)2015-02-28

I made a program that talks to you with a raspi programmed in python. I got into an argument with it. raspberry pi for dummies has the guide.

author
Kafukai made it! (author)2015-02-28

Sweet! I'll try this at work, we have an interior network, but we have a shared folder with every computer.

author
redmarkonthewall made it! (author)2015-02-28

I tried it but something isn't working.. The messenger part seems to be ok but the receiver doesn't seem to work proper... It's keeps running some time stamps and the says wait 1 or 2 seconds then press any key and then is repeats a while bunch more lines of time stamps

author
Nate Oaks made it! (author)Nate Oaks2015-02-28

As for the time stamps, if you do not like them, just delete it by right clicking the messenger program and it should open notepad. Now just find where it says "%time%" and delete that function. Tell me if it works, otherwise I could just send the program without time stamps to an email. Make sure you save the changed document before you close it !!!

author
Nate Oaks made it! (author)Nate Oaks2015-02-28

The program waits 2 seconds before refreshing in order for it not to lag, and it will not fully work until you say something in the messenger. Please comment back if you have any more problems.

About This Instructable

15,596views

458favorites

License:

More by Nate Oaks:Chat ProgramMini HeaterChat Program
Add instructable to: