• 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: Test for valid URL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test for valid URL?


  • Subject: Re: Test for valid URL?
  • From: "Mark J. Reed" <email@hidden>
  • Date: Thu, 16 Sep 2010 10:59:53 -0400

A URL doesn't even have to refer to a network.  It's a very generic
syntax.  mailto:email@hidden - you don't have to be able to ping
bar.com, or even connect to it on the SMTP port, for that to be a
valid URL and even a valid email address.

On Thu, Sep 16, 2010 at 8:10 AM, James Nierodzik
<email@hidden> wrote:
> Some servers may have ICMP responses turned off.
> Sent from my iPhone
> On Sep 16, 2010, at 6:43 AM, Alex Zavatone <email@hidden> wrote:
>
> Could you do a shall script to ping it?
> On Sep 16, 2010, at 5:38 AM, Steve Thompson wrote:
>
> On 16 Sep 2010, at 01:48, Michael Grant wrote:
>
> Does AppleScript provide any way of testing whether a string is a
> valid URL before using it as the argument of the "open location"
> command?
>
> A couple of other people have mentioned that the word "valid" is ambiguous
> but for "standard" URLs this works
> try
> do shell script "curl http://hgghjgjhghj/";
> on error
> display dialog "No a valid URL"
> end try
> If curl can't resolve the url it returns an error which AppleScript's try
> statement can catch.
> Steve
> _______________________________________________
> 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
>
> _______________________________________________
> 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
>
>  _______________________________________________
> 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
>



--
Mark J. Reed <email@hidden>
 _______________________________________________
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

  • Follow-Ups:
    • Re: Test for valid URL?
      • From: Doug McNutt <email@hidden>
    • Re: Test for valid URL?
      • From: Alex Zavatone <email@hidden>
References: 
 >Test for valid URL? (From: Michael Grant <email@hidden>)
 >Re: Test for valid URL? (From: Steve Thompson <email@hidden>)
 >Re: Test for valid URL? (From: Alex Zavatone <email@hidden>)
 >Re: Test for valid URL? (From: James Nierodzik <email@hidden>)

  • Prev by Date: Re: when is a global not a global?
  • Next by Date: Re: Test for valid URL?
  • Previous by thread: Re: Test for valid URL?
  • Next by thread: Re: Test for valid URL?
  • Index(es):
    • Date
    • Thread