I remember some time ago I had a widget that displayed the output of a plain text website that showed your IP Adress but I cannot find that website. It was an apple script with only one line of code: to display the output from that website. Any help would be greatly appreciated.
If you want your Private IP only:
Create an apple script widget that displays the following code:
return IPv4 address of (get system info)
To copy your private IP to your clipboard on tap, add an Apple Script (async in Background) as associated action:
set the clipboard to IPv4 address of (get system info)
Voilà.
If you want your Private IP and your Public IP:
Create an apple script widget that displays the following code:
set PrivateIP to IPv4 address of (get system info)
set PublicIP to do shell script "curl checkip.dyndns.org | grep -Eo [0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+"
return "Private IP: " & PrivateIP & "
" & "Public IP: " & PublicIP
To copy your private IP to your clipboard on tap, add an Apple Script (async in Background) as associated action:
set the clipboard to IPv4 address of (get system info)
To copy your Public IP to your clipboard if you hold the widget, create a new trigger to execute and give it the code
set the clipboard to (do shell script "curl checkip.dyndns.org | grep -Eo [0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+")
Et voilà
Thanks so much!
1 Like