Jump to content
Sign in to follow this  

Creating An Instant Messenger

Recommended Posts


Hello fellow coders of AutoIT. I am extremely new to this concept of "networking". And I couldn't really seem to find anything helpful on the forums about what I am trying to do (it was mostly just people getting flamed for asking a question similar to mine). I am trying to make an Instant Messenger. I'll probably want to sit down one day and create a fancy GUI for it, but right now I just want to get the networking part down. Msgbox's would be a perfectly could substitute for now. But now how do I do this networking part? I have created two scripts, a server and a client, that must both be run for it to work. I was hoping to consolidate these into one. But the biggest problem I have with AutoIT is the lack on multitasking. Here are those two scripts:


#include <misc.au3>

func IM()
$input = InputBox("The IM", "Your message please")


$TCPconnect = TCPConnect(@IPAddress1, 403)

if $TCPconnect = -1 then Exit

TCPSend($TCPconnect, $input)

$exit = 1

while $exit < 3
    if _IsPressed("45") then $exit = 4

And the Server:

#include <misc.au3>

func Server()

$TCPListen = TCPListen(@IPAddress1, 403)
    $TCPAccept = TCPAccept($TCPListen)
Until $TCPAccept <> -1

    $TCPRecv = TCPRecv($TCPAccept, 1000)
until $TCPRecv <> ""
MsgBox(0,"The Message", $TCPRecv)

$ExitSer = 1

while $ExitSer < 3
    if _IsPressed("45") then $ExitSer = 4

Please help me out with this, it will be greatly appreciated :x

Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.