GUICtrlCreateLabel creates a label
GUICtrlSetData updates the text of a previously created label (or other controls)
you are creating thousands of new controls the longer your script runs.
also you ping spam the website with no delay between the pings.
added a timer which pings only every second and fixed updating the label:
#include <GUIConstantsEx.au3>
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>
Box()
Func Box()
Local $msg
GUICreate("iSerius", 260, 85, 1093, 625)
GUICtrlCreateLabel("iSerius : ", 5, 5, 100, 36)
$btnCon = GUICtrlCreateButton("Connect", 10, 50, 50, 25, 0)
$btnDC = GUICtrlCreateButton("Disconnect", 62, 50, 75, 25, 0)
$btnMCE = GUICtrlCreateButton("MCE", 190, 50, 40, 25, 0)
$lStatus = GUICtrlCreateLabel("UP", 40, 5, 100, 36)
GUISetState()
$ti = TimerInit()
While 1
If TimerDiff($ti) > 1000 then
$ti = TimerInit()
If Ping("google.com", 1000) Then
GUICtrlSetData($lStatus,"UP")
Else
GUICtrlSetData($lStatus,"DOWN")
EndIf
EndIf
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $GuI_EVENT_MINIMIZE
Case $msg = $GUI_EVENT_MAXIMIZE
Case $msg = $btnCon
Run("rasphone -d iSerius")
Case $msg = $btnDC
Run("rasdial /DISCONNECT")
Case $msg = $btnMCE
Run("explorer.exe 10.1.1.1")
EndSelect
WEnd
EndFunc ;==>Box