Well, I will put just the piece of code where I try to check connexion

...
code:
 
;
; Get the Current IP Adress
;
$IPAddress = @IPADDRESS0
$oct1 = LTRIM(SUBSTR($IPAddress, 1, 3))
$oct2 = LTRIM(SUBSTR($IPAddress, 5, 3))
$oct3 = LTRIM(SUBSTR($IPAddress, 9, 3))
$oct4 = LTRIM(SUBSTR($IPAddress, 13, 3))
$IPAdress = "$oct1.$oct2.$oct3.$oct4"
$oct1_int=0+$oct1
$oct2_int=0+$oct2
$oct3_int=0+$oct3
$oct4_int=0+$oct4
;
;
;
SET "ModeConnexion="
SELECT
CASE $oct1_int=127
Set "ModeConnexion=AUTONOME"
$MODECONNEXION="AUTONOME"
GOTO AUTONOME
CASE $oct1_int=10
IF ($oct2_int<>200)
Set "ModeConnexion=RESEAU"
$MODECONNEXION="RESEAU"
GOTO RESEAU
ELSE
Set "ModeConnexion=MODEM"
$MODECONNEXION="MODEM"
GOTO MODEM
ENDIF
CASE 1
Set "ModeConnexion=MODEM"
$MODECONNEXION="MODEM"
GOTO MODEM
ENDSELECT
...