Client & Server Script for TCP/IP Network Communication
Im not getting the right result for the script im trying to create because when I send a packet,
it adds about 30 Null Characters ( 00 ) after the packet info I am trying to send.
This is making it so the server I am trying to connect to is not reading it right and it isnt
recognizing the command im sending because it is too long.
Could this be a problem with winstock or the TCP Send script?
Im connecting to a Rcon server for BF2.
Could anyone post the latest server & client's code?
i want to run 2 applications on the laptop that when i press the binded key on thd desktop the laptop will select both programs then for example run the key "f1" on both applications.
is this easy to add to this script?
I have problem:
computer1: run Server
computer2: run Client, enter IP aaaaaaaaand -> "connect() indicated winsock error 10061?"
I encountered a similar problem. It means, that the connection was refused. This happens, if e.g. the server is not running or is running under a different IP-adress or listening to a different port. So perhaps you might want to check, whether the client is talking to the correct ip-adress and the correct port.
in my case, this also happened because of an airport express (a WiFi-Router), the server was running behind. I solved the problem using two alternatives: taking the airport express out of the connection OR ordering the airport express to reroute the public port XXXX (number known to the client) to the internal port YYYY (number known to the server). In my case, both numbers were the same. The internal ip-adress connecting to the rerouted ports was the internal ip-adress of the server.
I copied the two scripts client and server, modified the network adress and it is working perfectly, this is exactly what I was looking for since weeks, FANTASTIC. Thanks so much
But I have been passing hours trying to understand the script, going from the script to AutoHotKey help to understand each line, but it is all to complicated for me simple user of AHK.
I have made some of my own script, I have even been able to send keystrokes from one computee to an other with the use of synergy (it allow you to basically share mouse and computer over a network)
Ok I will get to my point: can someone for the porpuse of understanding the script make it as simple as possible , just the needed and basic things to send a simple order over to the client computer, a keystroke or a MsgBox or anything easy. I was thingking of:
Push B on the server -> Client will show a MsgBox with B For example with no error reports and other things just the basic so we can understand were exactly the basic instruction are in the script.
This would be so helpfull,
And on the Server side there are additional keys after the first send
1. Send [SERVER] f
The Problem is, when i copy [SERVER] e, as it was print out in console it only copies [SERVER] , so i have to copy e alone, I think this is also the receive problem, but how can i solve it?
People interested in this script may want to check out AHKSock:
It is a really very carefully written library for TCP/IP (socket) based communication. It requires a background in sockets (available online), but I think of it as superseding this script (just my opinion, and I confess not knowing this code very well any more).
If you're interested in chat programs, the author of AHKSock included 4 very carefully documented examples of how to use the library, and the third example is for a chat program.
Best of luck...
Add all these multiple user codes.
To make sure that you don't **** something up and look like some idiot,
URLDownloadtoFile http://cfaj.freeshell.org/ipaddr.cgiand FileRead it to the IP address variable.
First prompt for port.
Add a bookmarks list as the first GUI that shows up so you can have a list of chatroom servers, and then add as a secondary GUI accessed through a button a IP address and port prompter.
Replace the tooltip with a read-only edit and under it a non-readonly edit with a button that sends it to the server.
Have the server redirect client chattings to everyone.
Add a username prompt and a default username.
Add a settings file to save the bookmarks, the default username, etc.
Add the same thing for the server file, just with admin commands.
Add a signature symbol list so some person doesn't abuse the commands.
:wink: What do you think?