Info Posted April 17, 2008 Share Posted April 17, 2008 (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 July 7, 2009 by Info Link to comment Share on other sites More sharing options...
Triblade Posted April 18, 2008 Share Posted April 18, 2008 Nice.It does good what it is supposed to do!Here's mine: Multi-ping (Pong3) My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
Info Posted April 18, 2008 Author Share Posted April 18, 2008 (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 April 18, 2008 by Info Link to comment Share on other sites More sharing options...
Triblade Posted April 18, 2008 Share Posted April 18, 2008 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...I did not try, but don't think so because the ping commands takes enough time to make the loop not lag. My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now