;SERVER!! Start Me First !!!!!!!!!!!!!!!
$g_IP = "127.0.0.1"
; Start The TCP Services
;==============================================
TCPStartUp()
; Create a Listening "SOCKET"
;==============================================
$MainSocket = TCPListen($g_IP, 65432, 100 )
If $MainSocket = -1 Then Exit
; look for client connection
;--------------------
While 1
$ConnectedSocket = TCPAccept( $MainSocket)
If $ConnectedSocket >= 0 Then
msgbox(0,"","my server - Client Connected")
exit
EndIf
Wend
Ich kann das grad nicht testen,
aber da das von offizieller Seite stammt
geh ich schwer davon aus das das funktioniert.
Ich befinde mich grad in einer meiner Grauzonen,
aber wenn ich mich recht entsinne, muss man
Sockets forken um mehrere Clients daran zu hängen.
Da MSN ja Client No.1 ist, müsste dein Script "Client No.2"
darstellen...
Edit:
Ein angeblich funktionierender TCP Client in Autoit:
(google suche: autoit socket forken)
Quote:
PHP Code:
;------------------------------- ; AutoIt TCP Client made by b2k5 ;------------------------------- #include <GUIConstants.au3> $Form1 = GUICreate("TCPClient", 640, 480) $Edit1 = GUICtrlCreateEdit("", 0, 0, 640, 460, $ES_READONLY + $WS_VSCROLL + $ES_AUTOVSCROLL + $WS_HSCROLL + $ES_AUTOHSCROLL) $Input1 = GUICtrlCreateInput("", 0, 460, 600, 20) $Button1 = GUICtrlCreateButton("Send", 600, 460, 40, 20) $connected = 0 Global $socket Global $sendtxt HotKeySet("{ENTER}", "SendThatShit") GUISetState(@SW_SHOW) GUICtrlSetState($Input1, $GUI_FOCUS) TCPStartup() While 1 $msg = GUIGetMsg() $recv = TCPRecv($socket, 1024) Select Case $msg = $GUI_EVENT_CLOSE If $connected = 1 Then TCPSend($socket, "QUIT :TCPClient exited." & @CRLF) TCPCloseSocket($socket) TCPShutdown() EndIf ExitLoop Case $msg = $Button1 SendThatShit() Case Else If $recv <> "" Then GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & $recv & @CRLF) If StringInStr($recv, "PING") Then $Pingval = StringSplit($recv, " ") $Pong = "PONG :" & $Pingval[2] TCPSend($socket, $Pong & @CRLF) GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & $Pong & @CRLF) ToolTip("Ping? Pong!") Sleep(2000) ToolTip("") EndIf EndIf EndSelect WEnd Exit Func SendThatShit() If WinActive("TCPClient") Then $sendtxt = GUICtrlRead($Input1) GUICtrlSetData($Input1, "") If $sendtxt <> "" Then If $connected = 1 Then If StringInStr($sendtxt, "QUIT") Then TCPSend($socket, $sendtxt & @CRLF) $connected = 0 Else TCPSend($socket, $sendtxt & @CRLF) EndIf Else If StringInStr($sendtxt, "/connect") Then $server = StringSplit($sendtxt, " ") $serversplit = StringSplit($server[2], ":") $ip = TCPNameToIP($serversplit[1]) $port = $serversplit[2] $socket = TCPConnect($ip, $port) If $socket = -1 Then MsgBox(64, "TCPClient", "Connection Failure.") $connected = 0 Else MsgBox(64, "TCPClient", "Connected successfully.") $connected = 1 SendAtConnect() EndIf Else MsgBox(64, "TCPClient", "Not connected.") EndIf EndIf EndIf Else Send("{ENTER}") EndIf EndFunc ;==>SendThatShit Func SendAtConnect() TCPSend($socket, "NICK TCPClient" & @CRLF) TCPSend($socket, 'USER TCPClient "TCPClient" "TCPClient" :TCPClient' & @CRLF) EndFunc ;==>SendAtConnect
Man beachte vorallem / keep attention at the parameter:
Quote:
PHP Code:
$recv = TCPRecv($socket, 1024)
Vorallem da 1024 bekanntermaßen Standard ist...
Nicht wie bei dir/ wrong parameter:
[Request] Monitor for multiple Clients 05/31/2009 - SRO Private Server - 2 Replies Hey,
I would like to have a (Bot-)Monitor where I can control multiple Clients.
For example it should have hide/show function.
Does something like this exist for ECSRO or could someone make it?
Would be great ;D
autoit request 03/05/2008 - Cabal Online - 2 Replies I'm trying to make an autoit script to click a color every 10 sec i understand how to pixel search but i dont know how to make the code for the rest could anyone help me?
p.s. I found out how to pixel search from bob16 tut , I tryed to edit his script but i really dont know enough about this to do it