• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IP Address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IP Address


  • Subject: Re: IP Address
  • From: vectormation <email@hidden>
  • Date: Thu, 8 Mar 2001 18:18:16 -0500

Problem with this is that (at least in my case) it does not
work for DHCP addresses - I always got "0.0.0.0"... YMMV

~Phi


>AFAIK, Remote Access scripting is only helpful for people using PPP to
>connect to the net.
>
>It might be better to suggest using Network Setup Scripting as a generic
>solution. I use the following script to get my current IP address:
>
>log IPAddressFromNetworkSetup()
>
>on IPAddressFromNetworkSetup()
> set currentIP to ""
> tell application "Network Setup Scripting"
> try
> try
> open database
> on error errmsg
> if errmsg contains "already open" then
> close database
> open database
> end if
> end try
>
> begin transaction
>
> set thisConfig to the active tcpip configuration
> set currentIP to IP address of TCPIP v4 configuration named
>thisConfig
>
> end transaction
>
> close database
>
> on error errmsg number ErrNum
> abort transaction
> close database
> end try
> return currentIP
> end tell
>end IPAddressFromNetworkSetup
>
>HTH
>
>JR


  • Prev by Date: Re: how to get the zero's out of a list
  • Next by Date: Re:Helpviewer Font Size
  • Previous by thread: Get the zero's out a list.
  • Next by thread: Re: IP Address
  • Index(es):
    • Date
    • Thread