Sign in to follow this  
Followers 0
Info

Ping Checker! :D

4 posts in this topic

#1 ·  Posted (edited)

#include <GUIConstants.au3>
#include <WindowsConstants.au3>

$MainGUI = GUICreate("Info's Ping Checker", 178, 93, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
;inputs
$WebsiteAddressInput = GUICtrlCreateInput("", 8, 28, 150, 21)
;labels
$WebsiteRadio = GUICtrlCreateLabel("Insert website \ IP address...", 8, 8, 250, 17)
$StatusLabel = GUICtrlCreateLabel("", 97, 66, 80, 80)
GUICtrlSetData ( $StatusLabel, "Waiting...")
GUICtrlSetColor ( $StatusLabel, 0xFF0000)
;button
$PingButton = GUICtrlCreateButton("Check My Ping", 8, 60, 81, 25, 0)
;set state
GUISetState(@SW_SHOW)

While 1
    $m = GUIGetMsg()
    Switch $m
        Case $GUI_EVENT_CLOSE
            Exit
        Case $PingButton
            GUICtrlSetData ( $StatusLabel, "Checking Ping...")
            GUICtrlSetColor ( $StatusLabel, 0x31D907)
            $PinCheckWebsite = Ping ( GUICtrlRead ( $WebsiteAddressInput))
            GUICtrlSetData ( $StatusLabel, "Ping is : " & $PinCheckWebsite)
            If $PinCheckWebsite = 0 Then
                GUICtrlSetData ( $StatusLabel, "Invalid Address!")
                GUICtrlSetColor ( $StatusLabel, 0xFF0000)
            EndIf
            If GUICtrlRead ( $WebsiteAddressInput) = "" Then
                GUICtrlSetData ( $StatusLabel, "Insert Address!")
                GUICtrlSetColor ( $StatusLabel, 0xFF0000)
            EndIf
    EndSwitch
WEnd

Edited by Info

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Question:

If I do something like:

Do
Ping ( "www.google.com")
Until 1+1=3

Will it lagg me hard?

Sorry for double post btw...

Edited by Info

Share this post


Link to post
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
Sign in to follow this  
Followers 0