You can check the network connection other ways too. Here's one I use on
my Win32 machine:


on checkNetStatus
  -- hide shell activity from user
  set the hideConsoleWindows to true

  -- ping a host that should always
  -- visible to your computer
  get shell("ping 24.10.72.1 -n 1 -w 200")

  -- isolate the status info
  put lineoffset("% loss",it) into x
  set the itemDelimiter to "="
  get word 1 of last item of line x of it

  -- tell somebody!
  if it <> 1 then
    answer "UP"
  else
    answer "DOWN"
  end if
end checkNetStatus


Regards,
Phil


----- Original Message -----
From: "Rolf Kocherhans" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 6:41 AM
Subject: Internet Check


> I tried to find a handler which checks Internet connectivity on all
> platforms with a registered name and without one.
>
> I tried this:
>
> on mouseUp
>    put hostNameToAddress(hostname()) into varIP
>    if varIP = "" then answer error "Not connected"
>    else
>     answer information "Connected" & return & "Your IP is : " & varIP
>    end if
> end mouseUp
>
> But this does not work if a Computer has only a TCP/IP number and no
> name entry.
>
> How can I check if the computer has an Internet connectivity or not.
>
> I tried the hostAddress() function but did not get it to work, I know
> it must be my fault !
>
> Is this for you Andu ?
>
> Cheers
> Rolf
>
> Archives: http://www.mail-archive.com/[email protected]/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>



Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to