Computing.Net > Forums > Programming > Make a chat program with batch

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Make a chat program with batch

Reply to Message Icon

Name: Lucifer2012
Date: February 11, 2009 at 14:45:28 Pacific
OS: Microsoft Windows XP Professional
CPU/Ram: 860 MHz / 119 MB
Product: Via technologies, inc. / Vt8601
Subcategory: Batch
Comment:

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
:A
Cls
echo MESSENGER
set /p n=User:
set /p m=Message:
net send %n% %m%
Pause
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.



Sponsored Link
Ads by Google

Response Number 1
Name: lee123abc
Date: February 12, 2009 at 13:04:09 Pacific
Reply:

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:
http://www.computing.net/answers/pr...


0

Response Number 2
Name: Judago
Date: February 13, 2009 at 00:30:53 Pacific
Reply:

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.......


0

Response Number 3
Name: Lucifer2012
Date: February 13, 2009 at 17:21:07 Pacific
Reply:

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?


0

Response Number 4
Name: JoeyTwoDrinks
Date: February 21, 2009 at 19:57:37 Pacific
Reply:

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.


0

Response Number 5
Name: Lucifer2012
Date: April 6, 2009 at 16:34:59 Pacific
Reply:

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.


0

Related Posts

See More



Response Number 6
Name: ghostdog
Date: April 6, 2009 at 17:49:20 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Make a chat program with batch

Making a list with batch www.computing.net/answers/programming/making-a-list-with-batch/15947.html

del a reg key value with batch www.computing.net/answers/programming/del-a-reg-key-value-with-batch/9246.html

Need help with a Java Program www.computing.net/answers/programming/need-help-with-a-java-program/12412.html