Mumms Posted October 11, 2009 Share Posted October 11, 2009 Is it possible for this to happen: User presses a hotkey and sends it to the server. Then anyone who is running my program will get a message from the server. For example: I press {F10} Then Everyone who is running my program would get a msg saying: Hello From Server Link to comment Share on other sites More sharing options...
Enforcer Posted October 11, 2009 Share Posted October 11, 2009 Set keyboard hooks and send the message, where is the problem ?... ) HotKeySet("{F10}", "sendms") Func sendms() Something... EndFunc [RU] Zone Link to comment Share on other sites More sharing options...
khui Posted October 11, 2009 Share Posted October 11, 2009 Is it possible for this to happen: User presses a hotkey and sends it to the server. Then anyone who is running my program will get a message from the server. For example: I press {F10} Then Everyone who is running my program would get a msg saying: Hello From Server You could try something like this: TCPStartup() $ip = "90.90.90.12" $port = 80 $MainSocket = TCPConnect($ip,$port) HotKeySet("a","a") Func a() TCPSend($MainSocket,"a") EndFunc Or you can use cases if you're going to have many keys. i > * Link to comment Share on other sites More sharing options...
dantay9 Posted October 11, 2009 Share Posted October 11, 2009 You would have to use TCPSend to send the command to each of the clients. In the main client loop, you should have something to parse through the messages and execute them accordingly. You can base your script off khui's basic example. You can use TCPRecv to receive the message on the client side. Link to comment Share on other sites More sharing options...
CodyBarrett Posted October 11, 2009 Share Posted October 11, 2009 there are a TON of TCPmulticlient examples and scripts here on the forums... there are a couple in my sig... there is one that John2006, a UDF that Kip has made... there are lots more.. those are just off the top of my head [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
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