I'm trying to obtain the download rate using netstat -e in command, and divide by 1000 to obtain the result in KB.
I'm using a script I managed to find on the forums, created by "TLM" admin? located here:
http://autohotkey.co...-low-bandwidth/
nstFile = % A_Desktop "\bytes.txt" Gui, Add, Text,, Current Bandwidth: Gui, Add, Text, W140 vbytes, Loading... Gui, Show, NA, BW Loop, { RunWait %comspec% /c ""Netstat" "-e" >"%nstFile%"",, Hide FileReadLine, bytesLine, % nstFile, 5 StringReplace, bytesLine, bytesLine, Bytes, bytesData = %bytesLine% StringSplit, bytesData, bytesData, % A_Space GuiControl, Text, bytes, % "In Bytes: " bytesData1 } GuiClose: ExitApp
It works, but displays the result in bytes. I've tried to modify the result like this, but failed:
nstFile = % A_Desktop "\bytes.txt" Gui, Add, Text,, Current Bandwidth: Gui, Add, Text, W140 vbytes, %bytesData% Gui, Show, Loop, { RunWait %comspec% /c ""Netstat" "-e" >"%nstFile%"",, Hide FileReadLine, bytesLine, % nstFile, 5 StringReplace, bytesLine, bytesLine, Bytes, bytesData := bytesLine/1000 StringSplit, bytesData, bytesData, % A_Space GuiControl 1: , bytes, %bytesData% } GuiClose: ExitApp
I'm not very competant when it comes to complex scripting. I've tried to modify the script in a variety of ways from any data I could find, and failed.
The ultimate goal is to refresh the file every second and obtain the KB rate per second through some sort of mathematic equasion. I'll cross that bridge when I can get past this hickup first.
Help is appeciated, thanks in advance.