New answers tagged

2

Using a package file open.m Needs["JLink`"]; $FrontEndLaunchCommand = FileNameJoin[{$InstallationDirectory, "Mathematica.exe"}]; UseFrontEnd[CreateDocument[]]; from a command line (Windows) cd \Program Files\Wolfram Research\Mathematica\10.4 start MathKernel -noicon -initfile C:\myPath\open.m


5

This question is more complicated that you might expect. Things you can check: Given how you want to use this, the simplest thing may be to just check if NotebookDirectory[] is different from $Failed. The documentation would suggest $Notebooks, but be careful: this is True even if running in command line mode but connecting to a front end anyway, e.g. ...



Top 50 recent answers are included