Jump to content

Internet speed checker


Achilles
 Share

Recommended Posts

Let me know what you think.. Especially about how accurate it is..

#NoTrayIcon
#include <GUIConstants.au3>
HotKeySet('{F1}', '_CheckInternetSpeed')
HotKeySet('^q', '_Exit')

Const $TIME = 20000

While 1 
    Sleep(400)
WEnd

Func _CheckInternetSpeed()
    InetGet("http://g.msn.com/8reen_us/EN/INSTALL_MSN_MESSENGER_DL.EXE", "C:\temp.exe", 1, 1)

    $gui = GuiCreate('Checking internet speed', 300, 70, -1, -1, $WS_SYSMENU + $WS_CAPTION, $WS_EX_STATICEDGE + $WS_EX_TOPMOST)
        GuiSetBkColor(14155735)
    $progress = GuiCtrlCreateProgress(5, 5, 290, 30) 
    $increment = 0 
    $oldIncrement = -1 

    $timer = TimerInit() 
    GuiSetState()

    While 1
        If TimerDiff($timer) > $TIME then ExitLoop 
        If TimerDiff($timer) > $increment then 
            GuiCtrlSetData($progress, $increment / ($TIME / 100)) 
            $increment = TimerDiff($timer)
        EndIf 
        If GuiGetMsg() = $GUI_EVENT_CLOSE then 
            InetGet("abort")
            GuiDelete($gui)
            Return
        EndIf
    Wend

    GuiSetFont(12)
    GuiCtrlCreateLabel("Kilobytes per second: " & Round(@InetGetBytesRead / ($TIME/1000) / 1024, 5), 5, 35, 290, 30, BitOr($SS_CENTERIMAGE , $SS_CENTER))

    Do 
        Sleep(30) 
    Until GuiGetMsg() = $GUI_EVENT_CLOSE
    GuiDelete($gui)
EndFunc

Func _Exit()
    InetGet("abort")
    Exit 
EndFunc
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Well, it's very "accurate", but this will check the speed download for the current file, not the main speed that you internet is able to.

I think there is need to check connection type, modem etc.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

Yes, it is accurate, but how about downloading and uploading via FTP ?

[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

Link to comment
Share on other sites

Works ok... 182kbs?? That sounds a bit too fast though... but maybe its right :rolleyes:

what about doing a ping test...... calculate the approximate distance to somewhere..... then do a ping, returning.... :rambo:

Link to comment
Share on other sites

Let me know what you think.. Especially about how accurate it is..

#NoTrayIcon
#include <GUIConstants.au3>
HotKeySet('{F1}', '_CheckInternetSpeed')
HotKeySet('^q', '_Exit')

Const $TIME = 20000

While 1 
    Sleep(400)
WEnd

Func _CheckInternetSpeed()
    InetGet("http://g.msn.com/8reen_us/EN/INSTALL_MSN_MESSENGER_DL.EXE", "C:\temp.exe", 1, 1)

    $gui = GuiCreate('Checking internet speed', 300, 70, -1, -1, $WS_SYSMENU + $WS_CAPTION, $WS_EX_STATICEDGE + $WS_EX_TOPMOST)
        GuiSetBkColor(14155735)
    $progress = GuiCtrlCreateProgress(5, 5, 290, 30) 
    $increment = 0 
    $oldIncrement = -1 

    $timer = TimerInit() 
    GuiSetState()

    While 1
        If TimerDiff($timer) > $TIME then ExitLoop 
        If TimerDiff($timer) > $increment then 
            GuiCtrlSetData($progress, $increment / ($TIME / 100)) 
            $increment = TimerDiff($timer)
        EndIf 
        If GuiGetMsg() = $GUI_EVENT_CLOSE then 
            InetGet("abort")
            GuiDelete($gui)
            Return
        EndIf
    Wend

    GuiSetFont(12)
    GuiCtrlCreateLabel("Kilobytes per second: " & Round(@InetGetBytesRead / ($TIME/1000) / 1024, 5), 5, 35, 290, 30, BitOr($SS_CENTERIMAGE , $SS_CENTER))

    Do 
        Sleep(30) 
    Until GuiGetMsg() = $GUI_EVENT_CLOSE
    GuiDelete($gui)
EndFunc

Func _Exit()
    InetGet("abort")
    Exit 
EndFunc
It is not accurate, AFAIK, the DSL connection rating is rated me with bigger rate :rambo:. Here you go 3+ on the topic because of hard work. :rolleyes:

And if you maybe can make it a little bit accurate and add upolad speed (use some free account on free host which supports FTP, and don't use 110MBs) to make it better so it may even got 5.

I can do signature me.

Link to comment
Share on other sites

Well, it's very "accurate", but this will check the speed download for the current file, not the main speed that you internet is able to.

I think there is need to check connection type, modem etc.

For the first part, isn't that just the same? If your downloading a file with everything possible wouldn't be the main speed that you internet goes at? Unless downloading a file doesn't use all your speed? About "connection type, modem etc.", I really have no idea how to to that... I got the inetget idea from Bert..

@Bert

Works ok... 182kbs?? That sounds a bit too fast though... but maybe its right smile.gif

what about doing a ping test...... calculate the approximate distance to somewhere..... then do a ping, returning.... tongue.gif

My speed was a bit fast too, when downloading files I get a max of 15 kb/sec (go third world countries!!!), but it said that it was getting twenty... Um, if you want to try the ping idea go ahead, and let me know how it works, but I don't think I could figure how it works...

@i542/Dhilip

It is not accurate, AFAIK, the DSL connection rating is rated me with bigger rate wink.gif. Here you go 3+ on the topic because of hard work. smile.gif

And if you maybe can make it a little bit accurate and add upolad speed (use some free account on free host which supports FTP, and don't use 110MBs) to make it better so it may even got 5.

My ignorance is revealed yet again! Like what I replied to MsCreatoR, I really have no idea how I would do that...
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

703.55 KBs.

It's a little slow. But almost there.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

My speed was a bit fast too, when downloading files I get a max of 15 kb/sec (go third world countries!!!), but it said that it was getting twenty... Um, if you want to try the ping idea go ahead, and let me know how it works, but I don't think I could figure how it works...

I'm trying a variety of methods now :rolleyes: I'll post when I'm done :rambo:
Link to comment
Share on other sites

I'm trying a variety of methods now :rambo: I'll post when I'm done :x

Ok, that's cool

@Firestorm: A little slow??? I get 20kb/s!!!

@Dethredic: Same as what I said to Firestorm!!! :rolleyes: So for what you suggest "kbps (*10)", I would just multiply it all by 10? Wouldn't that be something different then kb/s?

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Here's some tests I did from internet sources:

>----<

http://www.speakeasy.net/speedtest/

Download Speed: 14238 kbps (1779.8 KB/sec transfer rate)

Upload Speed: 1877 kbps (234.6 KB/sec transfer rate)

>----<

http://www.dslreports.com/stest?flash=1

Download Speed: 7683 kbs

Upload Speed: 1735 kbs

>----<

http://www.speedtest.net/

Posted Image

Download Speed: 10679 kbs

Upload Speed: 1830 kbs

>----<

http://myspeed.visualware.com/

Download Speed: 8.67 Mps

Upload Speed: 2.69 Mps

The last one are closest to my actual.

It should be about 8 megs per second for download. And I don't know about upload.

My internet is about ...$75 per month. At comcast.

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

$75 per month?!!! :rolleyes::rambo::x that cant be true!

Actually yes it can. If I had the money, I'd get up to 17Mbps and 60GB transfers, for the low, low price of $129.95 :)... One day....... :mad:
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...