Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: How to check an IP Address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check an IP Address



Title: Re: How to check an IP Address
On 7/22/09 5:22 PM, "Steve Thompson" <email@hidden> wrote:

On 22 Jul 2009, at 22:12, Andrew P wrote:

For example:
set IP to "INSERT IP ADDRESS SCRIPT HERE"

(display dialog "Your IP address is (now I need to insert the variable IP, need help here too. It makes it into text.)")


Change en0 to the network interface you're using.

set ipadd to do shell script "ipconfig getifaddr en0"
display dialog "You IP address is " & (ipadd as string) & "."

If you only need the ‘primary’ IP address you can get it from standard additions, no do shell script needed:

set theIPAddress to IPv4 address of (get system info)

--
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed."

Dwight D. Eisenhower, April 16, 1953
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: How to check an IP Address (From: Steve Thompson <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.