Re: Strange Errors
Re: Strange Errors
- Subject: Re: Strange Errors
- From: Steve Mills <email@hidden>
- Date: Mon, 10 Aug 2015 15:51:43 +0000 (GMT)
On Aug 10, 2015, at 10:42 AM, Daniel Chavez <email@hidden> wrote:
Good morning/afternoon,
I’m trying to create a multi-dialog with the ability to ping an IP or domain name, or retrieve an IP.
I have an existing dialog as
display alert "What would you like to do" buttons {"RetrieveYourIP", "PingIPOrDomainName", "Quit"} cancel button "Quit" with title "Select a network option"
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
WanIP()
display alert "Your IP Address is" & WanIP() & "And has been copied to your clipboard."
set the clipboard to WanIP()
on WanIP()
set WIP to missing value
repeat with thissite in siteList
try
set WIP to item 1 of paragraphs of (do shell script "curl " & thissite & " | tr -cs '[0-9\\.]' '
\\012' | awk -F'.' 'NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && $4<256 && !/\\.\\./'")
if WIP is not missing value then exit repeat
end try
end repeat
return WIP
end WanIP
else
This doesn't even compile. First, "display alert" has no "with title" parameter (at least not in my version on10.10.4). Then there's an "else" after "end WanIP". Did you paste a partial script multiple times or something?
Sent from iCloud's ghastly UI, so sorry about the formatting
_______________________________________________
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