• 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: Jolly Roger <email@hidden>
  • Date: Wed, 07 Mar 2001 12:46:56 -0600
  • Replyto: email@hidden

on 3/7/01 3:25 AM, Andrew Wylie (email@hidden) wrote:

> --Apple's Remote Access Commands OSAX:
> set theAddress to server name of (PPP status)
> -- "xxx.xxx.xx.1"

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


References: 
 >Re: IP Address (was Eudora script works?) (From: Andrew Wylie <email@hidden>)

  • Prev by Date: help with Tanaka's
  • Next by Date: Re: [ANNOUNCEMENT] Dialog Studio
  • Previous by thread: Re: IP Address (was Eudora script works?)
  • Next by thread: Re: TIDs case insensitive?
  • Index(es):
    • Date
    • Thread