Make a chat program with batch

Via technologies, inc. / Vt8601
February 11, 2009 at 14:45:28
Specs: Microsoft Windows XP Professional, 860 MHz / 119 MB
I tried to find a way of sending and receiving messages in an IM type manner with batch, from one computer to another across the internet, for the purpose of just having conversations in a completely simple way. And, it reminds me of the matrix. The matrix is cool. lol. It came to a point where I kept on getting this same result:

"1) All you need is your friend's IP Address and your Command Prompt.

2) Open Notepad and write this code as it is, !

@echo off
set /p n=User:
set /p m=Message:
net send %n% %m%
Goto A

3) Now save this as "Messenger.Bat".

4) Open Command Prompt.

5) Drag this file (.bat file) over to Command Prompt and press Enter.

6) Now, type the IP Address of the computer you want to contact and press enter
You will see something like this:

7) Now all you need to do is type your message and press Enter.
Start Chatting, !"

This thing definitly doesn't work. (I saw that almost everything was wrong with this file.) I made my own batch file, a modified version of the above, to make things feel right, and even though I've never gotten the opportunity to try it, I'm sure it works. Anyway, the main problem is that both these batch files will only work on a LAN network, and I'm really looking for a batch file that will work across the internet. Here is my idea for it:

Type message through command prompt---->Message is saved as a file---->Command prompt sends file as an email---->A program on the target computer auatomatilcally finds and downloads the email, the subjet of the email being the trigger for download---->File is read on command prompt on target computer---->Target computer sends responce through the same process.

Here's what I can do: I can type and save the message, send it with a certain subject so the program will know that this is the email containing the message, even though I haven't gotten BLAT to work yet, and I can read the responce file if it is on the hardrive. But I don't know if it is possible to download an email from an email account with batch. The best thing I know I can to do is open up the login screen for hotmail, and you would still have to manually type in your password. If it is not possible to download the file with batch, then are their any free programs that can do this for me? I don't want any trial versions or large programs, darnit. And if it IS possible to download with batch, show me how. What do you think of this method? Do you have any better ideas, or any input that could help? (Please don't ask me "why not go back to using windows live messenger?") All your help is appreciated.

See More: Make a chat program with batch

Report •

February 12, 2009 at 13:04:09
I had the same problem.

Try net send USERNAME hello

or try this... msg USERNAME hello (place your username there to test) I bet it works... but it wont work over a network.

Check this out:

Report •

February 13, 2009 at 00:30:53
There is some command line utilities for email but the problem is this - How do you distinguish between messenger email and other email to the same account? Of course spam could also be an issue here.

It might be an idea to find some web space where you can upload/download via ftp but I'm no expert on using ftp so I can't be of much help there.......

Report •

February 13, 2009 at 17:21:07
Well, thanks for your advice anyway. I just got another command line program called getmail. Still need to take some time out to learn the syntax and see how if I fancy it. For the messenger email, I've got to find some kind of trigger that starts the download. A little something like:

If %trigger% == "trigger" start download

Catch my drift?

Report •

Related Solutions

February 21, 2009 at 19:57:37
Rather than using e-mail as a way to accomplish this task, I would suggest looking into the possibilities of the FTP command.

Another consideration is to ensure that you make use of the SC command to start and stop the Messenger service on each computer.

Report •

April 6, 2009 at 16:34:59
Ugh. I don't want it to have anything to do with a network. And... I will look into FTP, because I never learned how to use it.

Report •

April 6, 2009 at 17:49:20
get a real programming language such as Python / Perl. MSN modules should have already been created so you can use them with ease. forget about doing all these in batch.

Unix Win32 tools | Gawk for Windows

Report •

Ask Question