shEiD Posted August 16, 2010 Posted August 16, 2010 I'm new to TCP. I've tried it with AutoIt's inbuilt functions (2 scripts: server/client) and it worked. Only when I try to send commands to Zoom Player, it does not work. Am I doing something wrong, or simply missing something, being total TCP newb?The code I'm trying:$msg = "5100 fnPlay" & @CRLF $ip = "127.0.0.1" $startup = TCPStartup() $socket = TCPConnect($ip, 4769) $send = TCPSend($socket, $msg) $closesocket = TCPCloseSocket($socket) $shutdown = TCPShutdown() ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $msg = ' & $msg & @CRLF) ;### Debug Console ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : TCPStartup() = ' & $startup & @CRLF) ;### Debug Console ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : TCPConnect() = ' & $socket & @CRLF) ;### Debug Console ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : TCPSend() = ' & $send & @CRLF) ;### Debug Console ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : TCPCloseSocket() = ' & $closesocket & @CRLF) ;### Debug Console ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : TCPShutdown() = ' & $shutdown & @CRLF) ;### Debug ConsoleI've tried @IPAddress1 and "127.0.0.1", nothing works properly. Sometimes I get some weird error from zoomplayer: "List index out of bounds (0)", but mostly - nothing. And I mean I'm getting nothing or error, when running the exact same code (the same, as in the example). Shouldn't I get error all the time? I'm really confused...Here is info about zoom player's TCP: linkThanks in advance for any help.PS, heres what I get in the console:@@ Debug(42) : $msg = 5100 fnPlay @@ Debug(43) : TCPStartup() = True @@ Debug(44) : TCPConnect() = 412 @@ Debug(45) : TCPSend() = 13 @@ Debug(46) : TCPCloseSocket() = True @@ Debug(47) : TCPShutdown() = TrueIt looks, like connection and sending were successful. Me understands nothing
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