• 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: machine IP address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: machine IP address


  • Subject: Re: machine IP address
  • From: Adam Bell <email@hidden>
  • Date: Tue, 25 Jul 2006 19:30:08 -0300

Title: Re: machine IP address
At 4:17 PM -0500 7/25/06, John C. Welch wrote:

this script:
-- snip

theEnabledServices is a list of the names of those services that have a leading asterisk. That list doesn't include IP addresses, so the following portion of the script produces a null result. Is there another switch (option) setting to get addresses?

set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {" "}
try
   repeat with x in theEnabledServices
       set theIPAddress to do shell script theServiceInfo & (quoted form of the contents of x) & "|/usr/bin/grep \"IP address\""
        
set theIPAddress to every text item of theIPAddress
       set the end of theIPAddressList to (contents of x) & ": " & (last text item of theIPAddress)
    
end repeat
end try
set
AppleScript's text item delimiters to oldDelims

should get you most of the way there.

Yup. It gets the services on offer and those that are enabled as IP ports, but not the IP Addresses.

If the Firewire port is not an IP port (on my machine it's enabled, but connected to a Firewire backup disk) it is considered off-line by "/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup " (since it isn't a network device, but there's no indication that it's "live").


--
"Death waits in the dark."
US Army Task Force 160 "Night Stalkers"

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
>esscable.net

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: machine IP address - Fixed
      • From: Adam Bell <email@hidden>
References: 
 >Re: machine IP address (From: "John C. Welch" <email@hidden>)

  • Prev by Date: Re: machine IP address
  • Next by Date: Desktop Picture not persist across reboot
  • Previous by thread: Re: machine IP address
  • Next by thread: Re: machine IP address - Fixed
  • Index(es):
    • Date
    • Thread