7h331337 Posted October 11, 2008 Share Posted October 11, 2008 can any one tell me why this snippet keeps freezing thanks TCPStartup() For $i = 3 To 10 Step 1 Sleep(10) $ip = "192.168.1." & $i $main = TCPConnect($ip, 80) If $main = -1 Then TCPCloseSocket($main) EndIf ToolTip($ip) Next Link to comment Share on other sites More sharing options...
martin Posted October 11, 2008 Share Posted October 11, 2008 can any one tell me why this snippet keeps freezing thanks TCPStartup() For $i = 3 To 10 Step 1 Sleep(10) $ip = "192.168.1." & $i $main = TCPConnect($ip, 80) If $main = -1 Then TCPCloseSocket($main) EndIf ToolTip($ip) NextTCPCloseSocket should be used to close a socket which is returned by TcpListen or TcpAccept, but not the socket returned by TcpConnect but in any case closing a socket which hasn't been created is not going to work. Even so, I wouldn't expect that to make your script hang. How long have you waited for it? (I assume that when it freezes the tooltip does not show "192.168.1.10".) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
7h331337 Posted October 11, 2008 Author Share Posted October 11, 2008 (edited) TCPCloseSocket should be used to close a socket which is returned by TcpListen or TcpAccept, but not the socket returned by TcpConnect but in any case closing a socket which hasn't been created is not going to work. Even so, I wouldn't expect that to make your script hang. How long have you waited for it? (I assume that when it freezes the tooltip does not show "192.168.1.10".)sorry it turns out i was not waiting long lol thanks for your helpis there any other way to make it go quicker beside making it sleep less Edited October 11, 2008 by 7h331337 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