Jump to content

Sending stuff to another computer


Recommended Posts

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?

Link to comment
Share on other sites

$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.
Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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 by Alek

[font="Impact"]Never fear, I is here.[/font]

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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...

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...