$PING = Ping("www.google.ca")
If $PING > 0 Then
$INTERNET = True
Run("C:\Programme\TV Movie\TV Movie ClickFinder\tvupdate.exe")
ProcessWait("tvuptodate.exe")
ProcessWaitClose("tvuptodate.exe")
Exit
Else
$INTERNET = False
EndIf
While 1
$PING = Ping("www.google.ca")
If $PING = 0 And $INTERNET = True Then
$INTERNET = False
ElseIf $PING > 0 And $INTERNET = False Then
$INTERNET = True
Run("C:\Programme\TV Movie\TV Movie ClickFinder\tvupdate.exe")
ProcessWait("tvuptodate.exe")
ProcessWaitClose("tvuptodate.exe")
Exit
EndIf
Sleep(1000)
WEnd