Jump to content

Simple way to send message from one computer to another

Recommended Posts

I have an seemingly simple request. I have a script running on a server PC. Occasionally, I want to send a message from that server to my PC (from one AutoIt script to another) so that I can display a pop-up box on my PC. I've been looking into how to do this and it seems the way to do it is with TCP servers and clients, however they all seem to give me trouble and not work reliably. The easiest way to do it seems to be to host the TCP server on my PC and run a TCP client on the remote machine each time I need to send a message, however once the client disconnects, the TCP server shoots up to 25% (1 core) CPU usage on my PC. I tried shutting down and restarting the TCP service after each message to no avail. It seems like a constant connection in necessary, however this is not ideal since my PC is not on 24/7. Is there any easy way of doing this? It doesn't have to be a TCP server, I just need to be able to send a simple message, even a true/false would be good enough. Thanks!

Edit: I was going to post on this thread, but for some reason that doesn't seem to be working. Anyway, this TCP stuff seems pretty overcomplicated, but I came up with an easy way of communication: The server modified a txt file on a network drive on my PC, and my PC has a script running that checks the file every 10 secs and acts based on it's contents. It's a pretty silly way of doing it, but it fits my needs and has basically no CPU usage so I'll probably stick with this method unless someone posts a simple TCP script that works perfectly.

Edited by quadrplax
The post button isn't working

Share this post

Link to post
Share on other sites

I would love to see the code you've tried. I believe that you need a server machine to listen and to push messages out to clients. How are you triggering the messages to be read or sent? I would have the server client listen to a directory and process any message that shows up and then maybe even archive it. I would have the server client loop for 10 seconds give or take and check the directory and process the data. This should reduce the cpu usage a great deal.

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

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

  • Create New...