Sign in to follow this  
Followers 0
Mumms

Send to/ from server

5 posts in this topic

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

Share this post


Link to post
Share on other sites



Set keyboard hooks and send the message, where is the problem ?... )

HotKeySet("{F10}", "sendms")

Func sendms()

Something...

EndFunc


[RU] Zone

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0