Re: "path to resource" in a tell Finder statement doesn't work
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: Daniel Jalkut <email@hidden>
- Date: Mon, 9 Jan 2006 10:00:10 -0500
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. :)
Daniel On Jan 9, 2006, at 9:54 AM, Andrea -XFox- Govoni wrote: "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.
|
_______________________________________________
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