Sending a text string over TCP
Posted 27 December 2011 - 02:56 PM
I have 2 pieces of software that communicate over TCP. One issues 'instructions' on how the other should look and what it displays (imagine A is a control panel and B is like a display screen). Using a socket sniffer I have intercepted a series of very simple single line commands from A to B (such as "turn_on" and "turn_off" etc). Software B simply receives and doesn't respond to the command over the network.
My question is, can I use AHK to make key presses send these text string commands to an IP address and port, hopefully elimitating the transmitting software from the equation and use an AHK script instead?
I have tried to use several example scripts in the AHKsock section and even tried to reverse engineer some of the remote control scripts without any success. Help or advice would be appreciated...
Posted 27 December 2011 - 02:57 PM
Posted 20 April 2012 - 10:02 AM
Thanks in advance
Posted 20 April 2012 - 12:07 PM
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?t=59593">viewtopic.php?t=59593</a><!-- l -->
I know it's a lot of reading but with that way you can get it.
Posted 20 April 2012 - 12:33 PM
Let the reading begin...
Posted 20 April 2012 - 02:40 PM
You can try using the Winsock wrapper for AHK
Posted 20 April 2012 - 03:40 PM
I modified it to remotely control the volume and play/pause media players. The way it works is that the commands are included in a AHK file on the remotely-controlled computer, and the "controlling" computer just tells it to launch these commands when you press buttons on the GUI. For example, for some of the commands, I use ControlSend and, as you can see from the Ultra Basic Chat button that the developer included, the info can be sent back and forth between two different computers.