Re: detect network with "automatic" location
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