The first line of my jsl is \\! which makes it executable (running outside of, or without first starting, JMP.exe). My script no longer works now and relies on Get Current Directory() which returns a different path if I try to run it and view the log in JMP. Can a JSL write the standard JSL log to a text file which I can read in another text editor? My script runs as a service in the background and never stops waiting for input files.
win = Window("Log");
ScriptBox = win[ScriptBox(1)];
text = ScriptBox << Get Text;
Save Text File("c:/Temp/Log.txt", text);
You can choose a different file path but c:/Temp is a generic location.
Log file should contain the script that executes and ends with "test" which we print.
For a little more control try the log capture() function. Put the code you want to capture the log for inside the parentheses, and it returns what would have gone to the log window. Thanks to craige for pointing that function out to me.
I realized that if I launch my script manually (with \\!), the JMP main windows does open although Get Current Directory() returns my \\! script path which is what I want. If I understand correctly, \\! just prevents the script from being displayed (thanks Wendy M. @ JMP). Once the main JMP window opens, I was able to go to VIEW > LOG to see what was going on in my invisible script.
There are no labels assigned to this post.