|
|
An AppleScript to obtain the WAN IP address
Here's a script that uses a few more sites if unable to get to dyndns.org:
An AppleScript to obtain the WAN IP address
Thought this might be a nice one-line addition to copy the answer to the clipboard.
WanIP()
display dialog "Copy this IP to clipboard? " default answer WanIP() set the clipboard to WanIP() on WanIP()     set WIP to missing value     set siteList to {"http://checkip.dyndns.org/", "http://whatismyip.com", "http://www.whatismyipaddress.com", ¬         "http://ipid.shat.net/", "http://www.edpsciences.comhtbin/ipaddress", "http://www.showmyip.com/"}     repeat with thissite in siteList         try             set WIP to item 1 of paragraphs of (do shell script "curl " & thissite & ¬                 " | tr -cs '[0-9\.]' '\012' | awk -F'.' 'NF==4 && $1>0 && $1
An AppleScript to obtain the WAN IP address
Thought this might be a nice one-line addition to copy the answer to the clipboard.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.26 seconds |
|