• 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: "path to resource" in a tell Finder statement doesn't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "path to resource" in a tell Finder statement doesn't work


  • Subject: Re: "path to resource" in a tell Finder statement doesn't work
  • From: Andrea -XFox- Govoni <email@hidden>
  • Date: Mon, 09 Jan 2006 15:54:55 +0100

Yvan KOENIG wrote:

>> --start copy here
>> tell application "Finder" to set iconToUse to path to resource
>> "applet.icns"
>> --end copy here
>>
>> Launch the saved application bundle with a double click in the Finder.
>> The Finder will display a "Resource not found." dialog.
>> If you don't include the "path to resource" command in a tell Finder
>> statement, it works as documented.
>>
>> Is think this is a bug.
>> Am I wrong?

> It seems that you are wrong, but of course I may be wrong.
>
> Perhaps useful to cut in two instructions:
>
> As "path to resource" is defined in standard additions, it is not
> logical to call it in a tell Finder statement.

AFAIK, as "path to resource" is defined in standard additions, it should
be possible to call it in *any* tell app statement.
This is what I understand reading the AppleScript Language Guide [1].
Ok, it's very outdated (bug report already filed…), but, hey, it's the
only official reference text from Apple available!
In particular, I think that this [2] section of the guide is relevant
regarding this discussion.
Among other things, it states:

"A scripting addition command performs its action only after the command
has been received by a target application. Unlike application commands,
scripting addition commands always work the same way regardless of the
application to which they are sent."

Indeed, this is how AppleScript behaves when using the "display dialog"
or "display alert" command, for example.


[1] http://tinyurl.com/dg6wg
[2] http://tinyurl.com/dvngw

--
Andrea "XFox" Govoni

AIM/iChat/ICQ: email@hidden
Yahoo! ID: xfox82
Skype Name: draykan

PGP
KeyID: 0x212E69C1
Fingerprint: FBE1 CA7D 34BE 4A53 9639  5C36 B7A0 605F 212E 69C1
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: "path to resource" in a tell Finder statement doesn't work
      • From: Daniel Jalkut <email@hidden>
References: 
 >"path to resource" in a tell Finder statement doesn't work (From: Andrea -XFox- Govoni <email@hidden>)
 >Re: "path to resource" in a tell Finder statement doesn't work (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: text Encoding with Write to file
  • Next by Date: Re: "path to resource" in a tell Finder statement doesn't work
  • Previous by thread: Re: "path to resource" in a tell Finder statement doesn't work
  • Next by thread: Re: "path to resource" in a tell Finder statement doesn't work
  • Index(es):
    • Date
    • Thread