I'm not exactly sure how Wolfram Scripts are supposed to work. So I wrote a simple one to configure MaTeX for me so that all I have to do is double click it on a system where I've installed Mathematica 11.3 in order to get MaTeX installed and working. However, when I run the code by double clicking the .wls script file on Windows 10, a black box pops up and never disappears; it looks like this:

enter image description here

Notice how, even though all the code finished executing, the console window stayed open. This is undesirable. Is there anything that I can put at the end of my Mathematica .wls script file to tell the console window to close immediately after running? I tried putting the line "exit" at the very end of the script, but this still didn't work either.

  • $\begingroup$ Quit instead of exit perhaps? $\endgroup$
    – ktm
    Jul 26, 2018 at 21:00
  • 3
    $\begingroup$ @user6014, alas, none of "Quit", "quit", "Exit", or "exit" make the console window close after running. $\endgroup$
    – jippyjoe4
    Jul 26, 2018 at 21:01
  • $\begingroup$ Try running 'exit' as an external command? reference.wolfram.com/language/tutorial/ExternalPrograms.html $\endgroup$
    – xieyn
    Jul 31, 2018 at 6:32
  • $\begingroup$ Unfortunately, that command has not worked for me either. $\endgroup$
    – jippyjoe4
    Aug 4, 2018 at 17:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.