Page 1 of 1

put URL → strange

Posted: Fri May 05, 2017 11:22 am
by Till Bandi
if I put <<put there is a url "https://www.apple.com">> into the message box I get "false"
if I put << launch "https://www.apple.com">> into the message box then the url opens correctly.

That seems strange to me. Is that a bug or is there an other way to find out if an url exists?

Re: put URL → strange

Posted: Fri May 05, 2017 12:07 pm
by Klaus
Hi Till,

obviously URLs do not belong to the things you can check the existence of!
From the dictionary about "there is...":
...
there is a {object | file filePath | folder folderPath | process procName}
...
I would "get" or "put... into" and check hte result. This is the result from a little test I just made:
tsneterr: (6) Couldn't resolve host 'www.abcdefghijklmnopqrstuvw.com'


Best

Klaus

Re: put URL → strange

Posted: Fri May 05, 2017 4:32 pm
by Till Bandi
great thanks!

Re: put URL → strange

Posted: Fri May 05, 2017 7:37 pm
by FourthWorld
Klaus wrote:obviously URLs do not belong to the things you can check the existence of!
That seems to be the case, but as long as it's going to give a value unrelated to a meaningful evaluation of the specified source (whether or not the requested resource exists), wouldn't "true" be the better answer?

After all, the url string itself is non-empty.

And even if the expression were evaluated, in all cases the value would be non-empty because at very least an error code would be the result.

Probably not worth the time to file an enhancement request for, but at the moment I side with the OP's linguistic intuition on this one.