shai Posted January 12, 2011 Share Posted January 12, 2011 i have a loop for ping. this is a code:While 1 $ping = ping ("www.google.com") If $ping > 0 then checktvexsit() ExitLoop Else SplashOff() $xsec = 30 do TrayTip ("No connected","You are not connected to the internet, chacking again in " & $xsec & " sec",1) sleep(1000) $xsec = $xsec - 1 until $xsec = 0 EndIf Wendthe problem is. if after 30 sec the internet is connection the script go to checktvexsit function but the loop cannot exit and the tooltip is also show in the task bar.thanks. Link to comment Share on other sites More sharing options...
shanet Posted January 12, 2011 Share Posted January 12, 2011 We cant help you. We need more information if you are expecting an answer. shanet [font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS: %programfiles%/AutoIt3/autoit3.chm Link to comment Share on other sites More sharing options...
shai Posted January 12, 2011 Author Share Posted January 12, 2011 What information is missing? Link to comment Share on other sites More sharing options...
funkey Posted January 12, 2011 Share Posted January 12, 2011 Maybe this is right? Local $ping, $xsec While 1 $ping = Ping("www.google.com", 1000) If $ping > 0 Then ExitLoop Else SplashOff() $xsec = 30 Do TrayTip("No connected", "Not connected to internet, checking again in " & $xsec & " sec", 1) Sleep(1000) $xsec = $xsec - 1 Until $xsec = 0 EndIf WEnd checktvexsit() Func checktvexsit() TrayTip("Connected to internet", "", 1) MsgBox(0, "", "Connection established") EndFunc ;==>checktvexsit Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
shai Posted January 12, 2011 Author Share Posted January 12, 2011 Maybe this is right? Local $ping, $xsec While 1 $ping = Ping("www.google.com", 1000) If $ping > 0 Then ExitLoop Else SplashOff() $xsec = 30 Do TrayTip("No connected", "Not connected to internet, checking again in " & $xsec & " sec", 1) Sleep(1000) $xsec = $xsec - 1 Until $xsec = 0 EndIf WEnd checktvexsit() Func checktvexsit() TrayTip("Connected to internet", "", 1) MsgBox(0, "", "Connection established") EndFunc ;==>checktvexsit thanks 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