Show internet / external IPs

Sharing and discussing custom actions for LaunchBar
Post Reply
neilio
Posts: 4
Joined: Fri Jun 12, 2009 3:40 pm

Show internet / external IPs

Post by neilio » Mon Jun 15, 2009 4:24 am

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.

ape
Rank 1
Rank 1
Posts: 32
Joined: Thu Jul 10, 2008 12:15 am
Location: Aloha, OR USA

Re: Show internet / external IPs

Post by ape » Mon Jun 15, 2009 7:49 am

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.

Forumposter
Posts: 18
Joined: Wed Jul 29, 2009 7:56 pm

Re: Show internet / external IPs

Post by Forumposter » Mon Aug 03, 2009 5:39 pm

What's the complete syntax for that? Something is missing.

Forumposter
Posts: 18
Joined: Wed Jul 29, 2009 7:56 pm

Re: Show internet / external IPs

Post by Forumposter » Sat Aug 15, 2009 2:52 pm

I found out myself.
"to show large type" in the external IP has to be changed to: "to display in large type"

Post Reply