Re: getting a file by URL ?
Re: getting a file by URL ?
- Subject: Re: getting a file by URL ?
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 2 Jun 2010 16:28:41 +0200
Le 2 juin 2010 à 15:56, Thomas Fischer a écrit :
Hello Yvan,
Am 02.06.2010 um 12:06 schrieb Yvan KOENIG:
…
It remains obscure why the Standard Additions claim
file URL (obsolete)
when it is used as a regular property in "System Events" and Finder.
Nothing obscure.
file URL is obsolete when used out of
a tell application "System Events"
or
a tell application "Finder"
block.
You mean *outside* of such a block?
I meant "obscure" such a sense that it is strange that "file URL"
is supported in two of Apple's applications and obsoleted in the
third.
I'd rather have it working in all of them, and I don't understand
why it wouldn't.
But I can't get Standard Additions to do anything useful with any URL:
get the scheme of "http://www.Google.de/"
does not compile and
get the scheme of URL "http://www.Google.de/"
gives an error
error "„URL \"http://www.Google.de/\"“ kann nicht gelesen werden."
number -1728 from URL "http://www.Google.de/"
Is the URL in Standard Additions obsolete for any scheme?
I repeat:
file URL is obsolete in Standard Addition.
which means, as I wrote that it's bad practice to call it out of
a tell application "System Events"
or
a tell application "Finder".
When you trigger file URL in one of the two described blocks, you
aren't 'speaking' to Standard Addition but to the application pointed
by the entry tell.
tell application "System Events"
-- chunk of code
file URL
-- chunk of code
end tell -- System Events
is OK.
tell application "Finder"
-- chunk of code
file URL
-- chunk of code
end tell -- Finder
is OK too.
-- chunk of code
file URL
-- chunk of code
is a wrongdoer.
It's simple, neat and precise.
Yvan KOENIG (VALLAURIS, France) mercredi 2 juin 2010 16:28:36
_______________________________________________
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