Wb-FreeKill Posted March 4, 2005 Posted March 4, 2005 DO $socket = DLLCall("au3xtra.dll","int","TCPConnect", "str", $g_IP, "int", 65432 ) Until NOT @ERROR msgbox(0,"test","Connected") Why are the msgbox poping up when the server aint open... It should try to connect until it finds thr server, and then run the script.
Alterego Posted March 4, 2005 Posted March 4, 2005 damn lar...with your skills you shouldn't have a hard time finding workwhen i was in the Navy we had all these retarded ass contractors. when it was time to install updates they sent two guys walking around the building's 500+ offices manually installing stuff...(sweet job in italy!) This dynamic web page is powered by AutoIt 3.
Wb-FreeKill Posted March 4, 2005 Author Posted March 4, 2005 Search() Func Search() DO $socket = DLLCall("au3xtra.dll","int","TCPConnect", "str", $g_IP, "int", 65432 ) Until NOT @ERROR And $socket[0] > -1 $socket = $socket[0] EndFunc ________________________ Lots of functions _________________________ windows() Drives() Complete() While 1 If $ret[0] < 0 Then msgbox(0,"test","server discet") Search() EndIF ; Server Disconnected... we Outty... ;-------------------------------------------- WEnd Okay, this is my script... when it starts, it will run in the Do..Until searching for server.. when server conencts, it will run the functions, and enter the While. If server disconnects, it should return to Search() function, and search for server.. that works fine.. but it wont run the other functions before the while again? How come
Wb-FreeKill Posted March 4, 2005 Author Posted March 4, 2005 Okay i did it my self, by adding the other functions efter server disconnets
Wb-FreeKill Posted March 4, 2005 Author Posted March 4, 2005 Maybe you could tell me why this aint working then? If $msg= $ConnectBtn Then If $ConnectedSocket = -1 Then ;msgbox(0,"test","hej") $ConnectedSocket = DLLCall(@Tempdir & "\au3xtra.dll","int","TCPAccept", "int", $MainSocket) If @ERROR Or $ConnectedSocket[0] < 0 Then $ConnectedSocket = -1 Else WinSetTitle($GOOEY,"","My Server - Client Connected") $ConnectedSocket = $ConnectedSocket[0] EndIf EndIf If client is running, and i press the button, nothing happens, and if i write GUICtrlread($connectBtn) It will connect no matter i press the button or not!?! :S
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