Getting cross-platform IP address

Scott Slaugh xslaugh at hotmail.com
Wed Aug 27 16:16:01 EDT 2003


>>I must be missing something obvious, but is there a command that provides 
>>the user's IP address (whether Mac or PC).
>>
>I'm collecting ways to do this, so I'd be pleased to see answers.

Here's a script I have that does this:

set the itemdel to ":"
get HostNameToAddress(item 1 of the address)

The address function should work without a connection to the internet.  
However, the hostNameToAddress() function does a DNS lookup, and as such 
requires an internet connection to work properly.  (See the entry in the 
Transcript Dictionary for hostNameToAddress for more information about 
this.)

Scott Slaugh

_________________________________________________________________
MSN 8: Get 6 months for $9.95/month. http://join.msn.com/?page=dept/dialup




More information about the use-livecode mailing list