path to current script - how??!

Hi there
Anyone out there have a failsafe way to get the current working directory of the script:


	set myPath to folder of (path to me)

That simply doesnt work - I get


any ideas??!

“folder of” is a Finder instruction, path to me is a Scripting Additions instruction. You need to do them separately
You want this:

set myPath to path to me
tell application "Finder"
	set myFolder to (container of myPath) as string
end tell
-- returns the path to the folder containing your script. 
-- You can then append
-- another file name, or use it as an alias.