Skip to content
Snippets Groups Projects
Commit 853d1a35 authored by deuce's avatar deuce
Browse files

Use try/throw/catch plus Spidermonkey Error.fileName extension to get the

path the scrip was started from.
parent 1a20872c
No related branches found
No related tags found
No related merge requests found
var startup_path='.';
try { throw new Error() } catch(e) { startup_path=e.fileName }
startup_path=startup_path.replace(/\/[^\/]*$/,'');
startup_path=backslash(startup_path);
load("sbbsdefs.js");
load("lockfile.js");
var Config = {
......@@ -50,7 +55,7 @@ exit(main());
function getpath()
{
return("../xtrn/dgnlance/");
return(startup_path);
}
function dgn_getkeys(keys)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment