• 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 16:23:58 +0100

Daniel Jalkut ha scritto:
> Indeed - and this is how the "path to resource" command is working.  In
> the same way that "display dialog" in a tell block will cause the dialog
> to appear in the context of the targeted application, the path to
> resource command is executing in the Finder's context, and thus
> searching for resources in its bundle contents.
>
> For instance, try changing your code to this:
>
> tell application "Finder" to set iconToUse to path to
> resource "burnableFolder.icns"
>
> The scripting addition is being very consistent - always doing the same
> thing - it's you that is pulling the rug out from under it by changing
> what "the resources folder" is at the given time. :)

Ok, you convinced me.
However, maybe it should be made clearer in the ScriptingAdditions
dictionary, as it states:

path to resource v : Return the full path to the specified resource
	path to resource string : the name of the requested resource
	[in bundle file] : an alias or file reference to the bundle containing
the resource (default is the current application/script bundle)

I interpreted "default is the current application/script bundle" as the
application or script bundle from which the command is executed.
Shouldn't be less misleading "default is the current application" and stop?

--
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>)
 >Re: "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: Daniel Jalkut <email@hidden>)

  • Prev by Date: Can't save compiled script
  • Next by Date: Re: similar strings
  • 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