Попробуйте это ... это должно работать для вас
try
set theIP to do shell script "curl ifconfig.co"
set the clipboard to theIP
activate
display dialog "Your Current IP Address Is.." & linefeed & theIP & linefeed ¬
& "It Has Been Copied To Your Clipboard" with icon 2 buttons ¬
"OK" default button 1 with title "Your Current IP Address Is.." giving up after 10
on error
display dialog "You Have No Internet Connection" buttons {"Cancel", "OK"} default button "OK"
end try