Return the COMPLETE path of the currently running APPLICATIONHow can I get the absolute and complete path of the currently running application?
Previously I've used
app_dir = Substr(Get Default Directory(), 2, 999);
but it just returns blank now that I'm experimenting with the application builder.
How can I get this functionality back? I'm not an expert on JMP yet so unless I absolutely have to I don't want to dive deep into the "create your application as an add in and reference a ton of procedures and things" I need to be able to hand my colleagues ONE file that they double click and it functions.
OtherScriptingRe: Return the COMPLETE path of the currently running APPLICATIONHi,
The "Get Default Directory" command returns "/" which results in "" when you apply your "Substring" command
Have you considered the following alternatives (either one):
app_dir = Get Path Variable ("HOME");
app_dir = Get Path Variable ("JMP_HOME");
The list of predefined Path Names can be found in the online help at: https://www.jmp.com/support/help/en/15.0/index.shtml#page/jmp/path-variables.shtml
Best,
TS
Re: Return the COMPLETE path of the currently running APPLICATIONwhen I run the get default directory and substring by hand I get the correct path, but when I call it from a function in the app it returns blank.
I think it's a limitation of JMP applications that they can't know where they are unless you build it as some kind of add on.
It's a pretty huge oversight that makes the platform inaccessible.
I think I have to rewrite my "application" as a regular jsl file at this time.
I'll keep an eye on the application part of JMP maybe they can get it right at some point in the future, right now it's more complicated than just writing UI's by hand.
Re: Return the COMPLETE path of the currently running APPLICATIONWhen I run just your line of code from a script window, on my Window's 10 box, I get a blank value.Re: Return the COMPLETE path of the currently running APPLICATIONIf you are trying to find the folder that holds the application because you have other files in the same folder, you can make a file in the folder named getMyPath.jsl and open it from the application with
names = include("getMyPath.jsl");if the file contains
Include File List();
as its only statement, names will be something like this:
{"C:\Users\v1\Desktop\New folder\getMyPath.jsl", "Module1"};
This does require running the application from the saved .jmpapp .
Note that you might not need to get the folder name at all since JMP opens from there by default. But only when running from the saved application.