How to make an AppleScript app locate itself?
To set the path of an AppleScript script or app to a variable use the following code:

set thePath to POSIX path of (path to me as text)


Example:

set thePath to POSIX path of (path to me as text)
display dialog "The path to me is: " &amp; thePath




If you want the path up to the script or app set to a variable use the following code:

set thePath to POSIX path of ((path to me as text) &amp; ":")


Example:

set thePath to POSIX path of ((path to me as text) &amp; ":")
display dialog "The path to me is: " &amp; thePath