Sippeangelo Posted August 7, 2007 Posted August 7, 2007 (edited) ----------------Removed------------------- Edited August 7, 2007 by Sippeangelo
Thatsgreat2345 Posted August 7, 2007 Posted August 7, 2007 Check the example scripts, there are a few sending/receiving things programmed. As well as a chat program which I'm sure if you look into it that it should yield the things you need. I would just say make sure your ports are forwarded on both computers.
Sippeangelo Posted August 7, 2007 Author Posted August 7, 2007 Check the example scripts, there are a few sending/receiving things programmed. As well as a chat program which I'm sure if you look into it that it should yield the things you need. I would just say make sure your ports are forwarded on both computers.Well thanks but i alredy know ow to send things over TCP.I also tried to send some text, and some numbers instead of the mouse coordinates and that went fine.The computers are over local network so there should be no problem with port forwards.It just outputs random numbers when i send info from the MouseGetPos array!Someone got a clue what's wrong?
idusy Posted August 7, 2007 Posted August 7, 2007 $recv_splitted = StringSplit($recv, ':', 1) MsgBox(0,"", $recv_splitted[1] & " - " & $recv_splitted[2]) I believe the [0] array returned by StringSplit is the number of strings it split into. The above should work.
Sippeangelo Posted August 7, 2007 Author Posted August 7, 2007 I believe the [0] array returned by StringSplit is the number of strings it split into. The above should work. Thanks but it still does not work. I hold my mouse still, and every 2 seconds it outputs wierd things like "05 - 478829" and "48726 - 48726".
Alek Posted August 7, 2007 Posted August 7, 2007 (edited) because the client and server dosent "Talk" to eachother you have to add another : after $pos[1] else the server will get a msg like this 124:214124:124 or posx:posyposx:posyposx:posy... TCPSend($ConnectedSocket, $pos[0] & ":" & $pos[1] & ":") Edited August 7, 2007 by Alek [font="Impact"]Never fear, I is here.[/font]
Sippeangelo Posted August 7, 2007 Author Posted August 7, 2007 because the client and server dosent "Talk" to eachother you have to add another : after $pos[1] else the server will get a msg like this 124:214124:124 or posx:posyposx:posyposx:posy... TCPSend($ConnectedSocket, $pos[0] & ":" & $pos[1] & ":") Great that pretty much makes sense but.. It's only supposed to send for example if my mouse is at position X: 112 and Y: 911 it would send "112:911". Then the StringSplit would split the recived message (112:911) into $recv_splitted[1] that cointains "112" and $recv_splitted[2] that would contain "911". Next time it recives the mouse position fomr the client it would owerwrite it, and not add it, or am i wrong there?
Sippeangelo Posted August 7, 2007 Author Posted August 7, 2007 Ok i have run a little test. Every frame it checks how many values it is in $recv_splitted. The answer should be 2. First the $recv_splitted[1] then $recv_splitted[2]. The first frame i get "2" from the test. So far so good. Next frame i get 294! Third frame 293 Then it keeps switching from 294 to 293 and back all frames. This des not make sense...
Sippeangelo Posted August 7, 2007 Author Posted August 7, 2007 Ok don't mind about this anymore.It seems as it will never be able to work properly.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now