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
}