Page 1 of 1

Show internet / external IPs

Posted: Mon Jun 15, 2009 4:24 am
by neilio
One feature I used all the time in Quicksilver was quickly displaying what the current IP addresses were for my system. It turns out converting this scripts over to a Launchbar script was dead simple:

Show External IP

Code: Select all

set theIP to do shell script "curl -sf http://checkip.dyndns.org/|cut -d ':' -f 2|cut -d '<' -f1|sed -e 's/ //g'"
tell application "Launchbar" to show large type theIP
return theIP


Show internal IP(s)

Code: Select all

set theIP to do shell script "ifconfig | grep 'broadcast' | awk '{print $2}'"
tell application "LaunchBar" to display in large type theIP
return theIP


One thing I'd like to add to the Internal IPs is what networking inteface the IP is assigned to, but I haven't been able to figure out if it's possible to have a mix of font sizes in the large type bezel.

Re: Show internet / external IPs

Posted: Mon Jun 15, 2009 7:49 am
by ape
If you use the 'with title "text"', argument to display in large type, the title will be displayed above the value in a smaller font. Not sure if this is what you're looking for or not.

Re: Show internet / external IPs

Posted: Mon Aug 03, 2009 5:39 pm
by Forumposter
What's the complete syntax for that? Something is missing.

Re: Show internet / external IPs

Posted: Sat Aug 15, 2009 2:52 pm
by Forumposter
I found out myself.
"to show large type" in the external IP has to be changed to: "to display in large type"