;getting info about traffic----------
Func get_info()
$cmd = Run(@comspec & " /c netstat -e", @SystemDir, @SW_HIDE, $STDIN_CHILD & $STDOUT_CHILD)
Sleep(500)
$line = StdoutRead($cmd)
$st = StringSplit($line,@CR)
For $i = 1 to $st[0]-1 Step 2
If $st[$i] <> "" And $i = 5 Then
$strn = StringSplit($st[$i],"")
$string = $st[$i]
For $n = 1 to $strn[0] Step 1
If StringIsDigit($strn[$n]) And $trimmed = 0 Then
$alltrimmed = 1
$stout = $stout & $strn[$n]
ElseIf Not StringIsDigit($strn[$n]) And $alltrimmed = 1 Then
$trimmed = 1
EndIf
Next
If $current = -1 And $afftermin = -1 Then
$current = $stout
ElseIf $current <> -1 And $afftermin = -1 Then
$afftermin = $stout
EndIf
$stout = ""
$trimmed = 0
$alltrimmed = 0
EndIf
Next
EndFunc