Re: How to check an IP Address
Re: How to check an IP Address
- Subject: Re: How to check an IP Address
- From: "John C. Welch" <email@hidden>
- Date: Wed, 22 Jul 2009 17:34:37 -0400
- Thread-topic: 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