• 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: getting a file by URL ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: getting a file by URL ?
      • From: "email@hidden" <email@hidden>
References: 
 >Re: getting a file by URL ? (From: Thomas Fischer <email@hidden>)
 >Re: getting a file by URL ? (From: "Mark J. Reed" <email@hidden>)
 >Re: getting a file by URL ? (From: Thomas Fischer <email@hidden>)
 >Re: getting a file by URL ? (From: "email@hidden" <email@hidden>)
 >Re: getting a file by URL ? (From: Thomas Fischer <email@hidden>)
 >Re: getting a file by URL ? (From: Yvan KOENIG <email@hidden>)
 >Re: getting a file by URL ? (From: Thomas Fischer <email@hidden>)

  • Prev by Date: Re: getting a file by URL ?
  • Next by Date: Re: getting a file by URL ?
  • Previous by thread: Re: getting a file by URL ?
  • Next by thread: Re: getting a file by URL ?
  • Index(es):
    • Date
    • Thread