That returns:
"/Applications/Utilities/Script Editor.app"
That returns:
"/Users/Shared/Dropbox/SW/DEV/JXA/JXA How To/Misc/[CORE] Get Name of Me in JXA.scpt"
Are the this
properties listed anywhere?
Of course, what I want returned is
Get Name of Me in JXA
which is what AppleScript would return for name of me
This gives me the path in a function:
var meStr = nameOfMe(this)
meStr
//-->"/Users/Shared/Dropbox/SW/DEV/JXA/JXA How To/Misc/[CORE] Get Name of Me in JXA.scpt"
function nameOfMe(pRefObject) {
var a = Application.currentApplication(),
sa = (a.includeStandardAdditions = true, a);
return sa.pathTo(pRefObject).toString();
}