Re: getting a file by URL ?
Re: getting a file by URL ?
- Subject: Re: getting a file by URL ?
- From: Thomas Fischer <email@hidden>
- Date: Wed, 2 Jun 2010 18:03:31 +0200
Hi Ed,
Am 02.06.2010 um 16:26 schrieb email@hidden:
> Try this:
>
> set myURL to choose URL
>
> scheme of (myURL as URL)
Interesting.
If I pick one of the servers offered in the "choose URL" dialog, I get
tell application "AppleScript Editor"
choose URL
--> "afp://172.16.122.1:548"
Result:
error "\"afp://172.16.122.1:548\" kann nicht in Typ URL umgewandelt werden." number -1700 from "afp://172.16.122.1:548" to URL
If I enter a "real" URL, I have
choose URL
--> "http://www.MathGuide.de/"
result:
http URL
which looks OK.
As far as I see, (myURL as URL) doesn't have all the properties a URL is claimed to have:
"http://www.Google.de/" as URL
--> {class:URL, scheme:http URL, path:"http://www.Google.de/", host:{class:Internet address, DNS form:"www.Google.de", port:80, dotted decimal form:"72.14.221.99"}}
get name of ("http://www.Google.de/" as URL)
doesn't compile and
get name of URL ("http://www.Google.de/" as URL)
yields an error,
get path of ("http://www.Google.de/" as URL)
does compile but again yields an error:
--> error "„path of {class:URL, scheme:http URL, path:\"http://www.Google.de/\", host:{class:Internet address, DNS form:\"www.Google.de\", port:80, dotted decimal form:\"72.14.221.99\"}}“ kann nicht gelesen werden." number -1728 from path of {class:URL, scheme:http URL, path:"http://www.Google.de/", host:{class:Internet address, DNS form:"www.Google.de", port:80, dotted decimal form:"72.14.221.99"}}
which I find strange because there is a path visible in the answer (but which isn't really the path…).
Is it possible that the properties "name" and "path" are somehow intercepted by some other OSAX?
On the other hand,
get dotted decimal form of host of the result
--> "72.14.221.99"
works nicely.
Thomas
_______________________________________________
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