hostNameToAddress not working???

Dave dave at looktowindward.com
Fri Feb 15 06:53:39 EST 2008


Hi All,

I have the following function:

------------------------------------------------------------------
--
--  Get the LAN IP Address of this Machine
--
------------------------------------------------------------------
function IPMGetHostIPAddressLAN
   local myHostIPAddress

   put hostNameToAddress(the hostName) into myHostIPAddress
   return myHostIPAddress
end IPMGetHostIPAddressLAN


This used to work fine and return the local LAN address of the  
machine the Script is running on, I just tried it and now it just  
returns empty.

I originally cribbed this from Richmond's "Get IP Address" stack. I  
download this again from rev online and it too fails. From this stack:

on mouseUp
   put "Public IP =" && url "http://xtalk.memebot.com/cgi-bin/ip.cgi"  
into line 1 of fld "F1"
   put "Local IP =" && hostnametoaddress ("localhost") into line 2 of  
fld "F1"
   put "LAN IP =" && hostnametoaddress(the hostname)  into line 3 of  
fld "F1"
end mouseUp

When I run this I get "empty" as the LAN Address. The other two IP  
address fields are filled in ok.

Could anyone shed any light on why this has stopped working and how I  
can obtain the LAN IP address?

Thanks a lot
All the Best
Dave





More information about the use-livecode mailing list