• 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: detect network with "automatic" location
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detect network with "automatic" location


  • Subject: Re: detect network with "automatic" location
  • From: Graff <email@hidden>
  • Date: Mon, 18 Oct 2004 01:41:20 -0400

Assuming that the external IP of each location is unique and doesn't change you could do this to find out the external IP:
----
set theData to do shell script "curl -s 'http://checkip.dyndns.org/'"
set theIP to word 21 of theData
-->"63.57.96.215"
----


You could then compare that IP address to a list of addresses to determine where you are at.

- Ken

On Oct 16, 2004, at 7:59 PM, Mikael Byström wrote:

Any ideas for detecting and determining network when you have location
set to automatic in network prefs? I need this detection to let a script
choose the proper SMTP server in my email client when connected to the 7-
8 different networks that I frequent in my daily work. I'm kinda tired to
do that by hand. I'd prefer to enter the info once.

_______________________________________________ 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
References: 
 >detect network with "automatic" location (From: Mikael Byström <email@hidden>)

  • Prev by Date: Re: Best tool for large (500MB) text manipulation
  • Next by Date: Re: A grocery list
  • Previous by thread: Re: detect network with "automatic" location
  • Next by thread: A grocery list
  • Index(es):
    • Date
    • Thread