$isconn Identifier - 19/07/04 05:10 PM
How about adding an identifier called $isconn? This would return $true if you are connected to the internet, and $false if you are not.
isconn { var %a = $ticks .comopen %a WScript.Shell if !$comerr { .comclose %a $com(%a,Run,3,bstr,cmd /c rasdial|find "Connected to">ras.txt,uint,0,bool,true) } [color:gray] ; check the size of ras.txt ; if a connection was found it will contain Connected to ; if no connection was found it will be empty[/color] var %a = $file(ras.txt) .remove ras.txt [color:gray] ; return the value of %a, if it is zero you are not connected[/color] return %a }