SHOW:
|
|
- or go back to the newest paste.
| 1 | - | NoTrayIcon |
| 1 | + | #NoTrayIcon |
| 2 | ||
| 3 | #include <GUIConstants.au3> | |
| 4 | ||
| 5 | HotKeySet("{ESC}", "_Exit")
| |
| 6 | ||
| 7 | Global $MyPing = 0 | |
| 8 | Global $i = 0 | |
| 9 | #region ### START Koda GUI section ### Form= | |
| 10 | $Form1 = GUICreate("Ping Checker", 187, 104, 193, 125)
| |
| 11 | $Label1 = GUICtrlCreateLabel($MyPing, 0, 0, 180, 97) | |
| 12 | GUISetState(@SW_SHOW) | |
| 13 | #endregion ### END Koda GUI section ### | |
| 14 | ||
| 15 | While 1 | |
| 16 | $nMsg = GUIGetMsg() | |
| 17 | Switch $nMsg | |
| 18 | Case $GUI_EVENT_CLOSE | |
| 19 | Exit | |
| 20 | EndSwitch | |
| 21 | Switch $i | |
| 22 | Case 500 | |
| 23 | Sleep(2000) | |
| 24 | _Ping() | |
| 25 | GUICtrlSetData($Label1, $MyPing) | |
| 26 | $i = 0 | |
| 27 | Case Else | |
| 28 | $i = $i + 1 | |
| 29 | EndSwitch | |
| 30 | ||
| 31 | WEnd | |
| 32 | ||
| 33 | ||
| 34 | Func _Ping() | |
| 35 | Global $MyPing = Ping("www.google.de")
| |
| 36 | EndFunc ;==>_Ping | |
| 37 | ||
| 38 | Func _Exit() | |
| 39 | Exit | |
| 40 | EndFunc ;==>_Exit |