January 16, 2018

Computer External IP Address

Simple macro to display the computers external IP address

Using Keyboard Maestro and AppleScript it's really easy to quickly display the computer's external IP address. This is similar to functionality that I created using TextExpander.

Using Keyboard Maestro, users have a lot more control. In this updated version of the script, I can display the IP address to the screen in large letters, and add it to the clipboard - ready to paste it where ever needed.

You can modify this any way you want to fit your needs.

Execute the Apple Script

The first step is to execute the AppleScript and set the results to a variable:

Setup My IP1

Code used:

Credit to www.applehelpwriter.com*
set myTemp to do shell script "mktemp -t txt"*
do shell script "curl -s http://checkip.dyndns.org &> " & myTemp & " &2> /dev/null"*
delay 3*
set extIP to do shell script "sed 's/[a-zA-Z/<> :]//g' " & myTemp

Display the Results to Screen

Use Keyboard Maestro's large text display and show the IP address on the screen:

Setup My IP2

Add to Clipboard

Add the IP address to the clipboard in case I need to paste the information into a working document.

Setup My IP3

Add your Comments

Feel free to leave a comment about this post.

- Feel Free to add HTML to your comment!


© 2022 - cryan.com