• 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: One more thing...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One more thing...


  • Subject: Re: One more thing...
  • From: Geoff Graham <email@hidden>
  • Date: Wed, 25 Aug 2010 09:40:45 -0400

If you're going to go the brute force route, you might as well go in all the way:

repeat with i from 0 to 6
	set ifstring to "ipconfig getifaddr en" & i
	try
		set ipAddress to do shell script ifstring
		return the result
	end try
end repeat

geoff


On Aug 24, 2010, at 5:36 PM, email@hidden wrote:

> Nice script.
>
>  You may try this:
>
> try
> 	set ipAddress to do shell script "ipconfig getifaddr en1"
> on error
> 	set ipAddress to do shell script "ipconfig getifaddr en0"
> end try
>

 _______________________________________________
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

  • Follow-Ups:
    • Re: One more thing...
      • From: "Mark J. Reed" <email@hidden>
References: 
 >One more thing... (From: email@hidden)
 >Re: One more thing... (From: email@hidden)

  • Prev by Date: Re: Sorting a list of records
  • Next by Date: Re: One more thing...
  • Previous by thread: Re: One more thing...
  • Next by thread: Re: One more thing...
  • Index(es):
    • Date
    • Thread