I am trying to implement a quick and dirty sort of "remote control" using sockets, with a Server and a Client stacks.
Both stacks have a library stack with all the communications scripts and are on two different computers on a local network.
The idea is that ,once established the communication, the server sends a screen shot of the current card (in which there are a few buttons) to the client .
The client has a mouse down script on the image control, that send the ClickLoc data to the server.
If the clickloc data corresponds to the position of a button control (the 2 stacks are of the same size) I should be able to run a mouse down/up from remote.
Everything works fine and fast on local and I can see that the position of the click on the server correspond to the mousedown position done on the client.
What is not working is that the button on the server is not running its mouse down/mouseUp handler.
If, on the server msg box, I run a "click at 275,229" or a send "Click at 275,229" to the card, the button works ok.
But this doesn't apply to the server script, which is something like this:
Code: Select all
click at TheMessage["DATA"] --location of the mouseDown sent by the client
set the loc of graphic "FakePointer" to TheMessage["DATA"]
- in the server the FakePointer moves correctly, as to prove that the current card is correct.
- Using a send "Click at tLoc" to card xxx in the server script does not work.
- The idea is not to use on the server script the control names, in order to send them mouseDown command. Just their position, like any desktop remote control software would do.
Any idea?
Also, I am curious to know (which is related) why this works from the msg box
Code: Select all
send "Click at 426,255" to this stack
Code: Select all
send "Click at 426,255" to this stack in 0 seconds
Trevix