Re: path to a script
Re: path to a script
- Subject: Re: path to a script
- From: Philip Aker <email@hidden>
- Date: Mon, 2 Feb 2009 20:00:02 -0800
On 2009-02-02, at 18:46:44, Donald Hall wrote: When used in a compiled script, "path to me" returns the path to the script in Leopard when the script is run by Script Editor. However, when I run the script with a script running application I wrote (an AppleScript application), I get the pre-Leopard result of the path to the application running the script. Is there any simple way of getting the path to the script in this case?
I think you're asking this:
set p2m to POSIX path of (path to me) set p2a to POSIX path of (path to current application) if (p2m is equal to p2a) then set p2r to POSIX path of (path to resource "main.scpt" in directory "Scripts") display dialog p2r else display dialog "path to me is not the same as path to current application" end if
Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@ Democracy: Two wolves and a sheep voting on lunch.
|
_______________________________________________
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