HostNameToAddress Replacement

Sarah Reichelt sarah.reichelt at
Wed Nov 22 01:38:12 EST 2006

On 11/22/06, Bridger Maxwell <bridgeyman at> wrote:
> Hello,
>   I have a friend who's iMac G5 seems to dislike the hostNameToAddress()
> function.  She is trying to help me develop a program, but without that
> function she can't run my networking system and that makes it extremely
> difficult for her to help.  I am looking for a replacement to the
> hostNameToAddress() function.  All it has to do is retrieve the IP address
> of the machine it is running on.  It doesn't have to be particularly clean
> either, it only has to run on her computer, not the computers we are
> distributing to.  Does anybody have any ideas?

Here is a neat function that appeared on this list a few weeks ago, I
think from Dar Scott.

function getLocalIPAddress
  put "" into tCheckAddress
  open datagram socket to tCheckAddress
  put the hostAddress of tCheckAddress into tMyIP
  close socket tCheckAddress

  return tMyIP
end getLocalIPAddress


More information about the Use-livecode mailing list