0

I have a simple .js script that is called by an unsafe condition sensor. This is run and works great.


var dome;

dome = new ActiveXObject("ASCOM.NexDome.Dome");
dome.Connected = true;

while (dome.ShutterStatus == 4);    // Error - wait for shutter to go online

dome.CloseShutter();
dome.Park();

dome.Connected = false;
dome.Dispose();
dome = null;

I now need to execute another .vbs script from inside the code above? Is there a simple execute command I can enter?

I want to execute this...

"Cscript C:\ParkRasa.vbs RASA_FACE_DOWN"

Jeroen Heier
  • 3,520
  • 15
  • 31
  • 32
  • Take a look at https://stackoverflow.com/questions/10186813/how-to-run-cmd-exe-with-parameters-from-javascript, you should be able to run that command using `var run=new ActiveXObject('WSCRIPT.Shell').Run("Cscript C:\ParkRasa.vbs RASA_FACE_DOWN");` – Étienne Laneville Oct 11 '19 at 17:30
  • Possible duplicate of [How to Run cmd.exe with parameters from javascript](https://stackoverflow.com/questions/10186813/how-to-run-cmd-exe-with-parameters-from-javascript) – Étienne Laneville Oct 11 '19 at 17:33

0 Answers0