Jump to content

Is there a way to check line speeds with AutoIt?


buymeapc
 Share

Recommended Posts

We need more info on what you're going for. Are you wanting throughput speeds? or just link speed determination (100Mb, 128kbps, etc)?

Either way there is nothing directly in AutoIt for that, you'd have to find a separate cmdline utility and call that.

Link to comment
Share on other sites

You could find a fast host(probably some speedtest site), and download a file from there with InetGet(should probably be a few MB's), downloading in the background, then calculate the download speed with @InetGetBytesRead..

Edit:

Something like this perhaps:

Dim $File = "http://support.easystreet.com/easydsl/testfile.bin"

InetGet($File, @TempDir & "\testfile.bin", 1, 1)

Dim $UpdateTimer = TimerInit()
Dim $oldBytesRead = 0

While @InetGetActive
    
    If TimerDiff($UpdateTimer) > 1000 Then ; 1 Second
        
        ConsoleWrite("Download Speed: " & ((@InetGetBytesRead-$oldBytesRead)/1024) & " kB/s" & @LF)
        $oldBytesRead = @InetGetBytesRead
        $UpdateTimer = TimerInit()
        
    EndIf
    
WEnd
Edited by FreeFry
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...