JFee Posted July 10, 2008 Posted July 10, 2008 So I was working on a program that accepts commands from another autoit program via TCP. I started development of this on a Windows XP box, and everything worked perfectly fine. Now I am home on my Vista machine and the TCPRecv isn't working the same way! The commands I am sending are text strings, anywhere between 8 and 15 characters long, so for the TCPRecv command I had this: $tcpMsg = TCPRecv($ConnectedSocket, 20) That worked perfectly fine... $tcpMsg would be the string I was sending. In Vista, however, unless the max length for the TCPRecv command is the exact number of characters, it won't return the string For instance, when I send "closeServer" to it, $tcpMsg is: 0x0B000000636C6F736553657276657200000000 If the max length is set to 11, then it works fine. Am I doing something wrong? Any help appreciated Regards,Josh
JFee Posted July 10, 2008 Author Posted July 10, 2008 Alright, that's a lie above... it is always sending as hex. Is there a way to convert from hex to text? That'd be a fine workaround Regards,Josh
Airwolf Posted July 10, 2008 Posted July 10, 2008 Alright, that's a lie above... it is always sending as hex.Is there a way to convert from hex to text? That'd be a fine workaround_HexToString() Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
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