Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: machine IP address - Fixed



Title: Re: machine IP address - Fixed
Fixed by Stan C.

At 7:30 PM -0300 7/25/06, Adam Bell wrote:
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:
http://lists.apple.com/mailman/options/applescript-users/bellac%40accesscable.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:
http://lists.apple.com/mailman/options/applescript-users/bellac%40accesscable.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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.