Troubleshooting Script

Hello !
This messsage referes to:

  1. Wndows 10.0.17763.107
  2. Atom 1.55.0 x64
  3. package Script

I’m incapable to properly set the package Script.

(1)

  • The buffer contains an html file.
  • I choose the menu Packages > Script > Run script
  • The file appears in th default browser. Fine !

(2)

  • The buffer contains an “Hello world!” batch file.
  • I choose the menu Packages > Script > Run script
  • I get the error: “You must select a language in the lower right, or save the file with an appropriate extension.”
  • Strange: the file has extension .bat: why do Script sees it as “Plain text” ?
  • Anyway, I try to set the grammar to “Windows Batch”, as mentioned in package’s page, but it isn’t available in the languages windows
  • I do not want to resign therefore I choose the menu Packages > Script > Configure script.
  • None of my many attemps is successfull: as command I use “c:\windows\system32\cmd.exe” and as parameters {FILE_ACTIVE}, file name, double quoted, not double quoted, file name only, full path … Nothing happens. Sob!

(3)

  • Even worse the same happens with Wolfram Mathematica code (command ‘c:\Program Files\Wolfram Research\Mathematica\9.0.1.0\math.exe’)
  • Coding in Mathematica is just exactly the reason why I met Atom and I’m working out with it (Mathematica has an editor for really great .nb files but not for .m files).

I’m grateful for any adivice !
Bye !
Helen

Here: Atom-script configure script & profiles suggestions - #2 by DamnedScholar
I read: “script does not store its profiles on your computer, but serializes them with Atom’s state information. This is not a very durable way of storing the information.”
Does it mean that Script isn’t configurable to permanentely handle Mathematica code ?

Basically, follow these steps:

First ensure that you can run any script or program through the command line (not using Atom to start with).

If/when you can run apps/scripts, transfer exactly that command line text into a process-palette custom command (you can create a library of such custom commands to launch). You will use instead of the command arguments the series of Atom variables which point to directory, file etc. Study the process-palette manual and Settings carefully and learn how to use Variables to create a path such as

c:\Program Files\Wolfram Research\Mathematica\9.0.1.0\math.exe

The link you cite above referring to DamedScholar points out process-palette as an alternative to script,

process-palette also allows entries in top menu bar … so you might create a menu item “Run Wolfram”.

script will probably offer similar features but I lean towards using process-palette.

Thanks for your reply!
I have removed Script and installed Process-palette, as you recommend.
I’m still experiencing difficulties, but I’m going to talk about them in a post I will send in a few moments (“Process-palette and Mathematica”), because the topic has switched from the former package to the latter.
Hope you read it!
Bye.

Well, you need to install a package that adds batch file support

I forgot the language support ! I have installed language-batchfile and process-palettem and now it works quite good. Thanks !