• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11


  • Subject: Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11
  • From: 2551 <email@hidden>
  • Date: Thu, 29 Oct 2015 20:11:43 +0700


On 29 Oct 2015, at 18:25, Daniel Chavez <email@hidden> wrote:
script» doesn’t understand the “ipaddress” message.

Because you’re calling a handler ipaddress() but you haven’t defined a handler with that name.

In terms of the IP address, this should work (but you still need to add the copy to clipboard code and CheckIP stuff):

#Ask the user to select a network option
display alert "What would you like to do" message "Select a network option" buttons {"RetrieveYourIP", "PingIPOrDomainName", "Quit"} cancel button "Quit"
set the button_pressed to the button returned of the result
#Buttons
if the button_pressed is "RetrieveYourIP" then
say "Retrieving Your IP address, this may take a moment." without waiting until completion


display alert "Your IP Address is " & return & return & ipaddress() & return & return & " and has been copied to your clipboard."
end if

#IP Definitions
on ipaddress()
return (do shell script "curl https://api.ipify.org")
end ipaddress

#CheckIP function for internet check code
to chkUP(theURL)
return (count (get ((theURL as URL)'s host & {dotted decimal form:""})'s dotted decimal form)) > 0
end chkUP





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Wan IP Retrieval No Longer Works For Me Under OS X 10.11 (From: email@hidden)
 >Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11 (From: 2551 <email@hidden>)

  • Prev by Date: Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11
  • Next by Date: Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11
  • Previous by thread: Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11
  • Next by thread: Re: Wan IP Retrieval No Longer Works For Me Under OS X 10.11
  • Index(es):
    • Date
    • Thread