Script stopped Working

  • 290 Views
  • Last Post 22 September 2018
millje posted this 25 August 2018

I have had a script that would activate my cameras to record via BI Command and Blue Iris.  This script has worked for several years and now all of a sudden it has stopped.  The script is pointed to a bat file in BI Command.  When I run the Bat file it works and the cameras record.  When I activate my scene in In Control with the script pointed to the bat file it will not run the Bat file like it used to.  Below is my script.  Does anyone have any ideas?  I do not see anything being logged in the logfile.  The location of the BAT file and BI Command are all correct.

 

using System;

using System.Collections.Generic;

using System.Text;

using MLS.ZWave.Service.Rules;

using MLS.ZWave.BusinessObjects;

 

public class Runbat : ScriptBase, ScriptInterface {

    public void runScript() {

        try {

System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();

                psi.FileName = @"C:\BiCommand\AllCameraRecord.bat";

                psi.CreateNoWindow = true;

                psi.UseShellExecute = false;

                System.Diagnostics.Process.Start(psi);

        } catch (Exception ex) {

            // Log the exception here

            var message = ex.Message;

        }

    }

}

 

Order By: Standard | Newest | Votes
rscott posted this 25 August 2018

To get some logs written to the logfile.txt, add the following just below the line that says "// Log the exception here".

// Log the exception here
writeFileLog("crash in camera record script", ex);
var message = ex.Message;

Also, you can try sprinkling log messages throughout to verify that it's running. Something like: writeFileLog("We made it here");

One final note, you will need to go offline/online for any edit you make to the script to force Axial to reload it.

millje posted this 22 September 2018

Sorry for the delayed response.  I tried the log exception here and did not see anything being logged.  I was talking to an IT professional and they stated that since my script quit working at the same time as a windows update happened that I showed copy the text of the script and delete it from the computer and then re-create it.  So  I did and everthing is back working.

Close