Results 1 to 3 of 3

Hybrid View

  1. #1

    Default add code to *.js script

    In my Observatorium I use a RCW box for remote control fo power switches. https://www.teracomsystems.com/ether...le-tcw181b-cm/
    For switching ON or Off a relais in a *.vbs script, I use following code:
    ---------------------
    Dim TCW
    Set TCW = CreateObject ("WScript.Shell")
    TCW.Run "c:\usr\bin\snmpset.exe -v 1 -c private 192.168.1.221 1.3.6.1.4.1.38783.3.2.0 integer 1" 'R1 ON
    set TCW = nothing
    ---------------------
    What would be the equivalent code for eg the SampleShutdownObs.js script?

  2. #2
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    33,212

    Default

    Quote Originally Posted by Ton van Vonderen View Post
    In my Observatorium I use a RCW box for remote control fo power switches. https://www.teracomsystems.com/ether...le-tcw181b-cm/
    For switching ON or Off a relais in a *.vbs script, I use following code:
    ---------------------
    Dim TCW
    Set TCW = CreateObject ("WScript.Shell")
    TCW.Run "c:\usr\bin\snmpset. c:\usr\bin\snmpset.exe 1 -c private 192.168.1.221 1.3.6.1.4.1.38783.3.2.0 integer 1" 'R1 ON
    set TCW = nothing
    ---------------------
    What would be the equivalent code for eg the SampleShutdownObs.js script?
    I am on the road, see my post at the top of the Comm Center. Here is an untested guess. If it doesn’t work you’ll need to wait until I get back and clear my urgent issues. Or you could look up Util.ShellExc() in ACP Help, scripting. Or you could convert the above VBS to JS by using new ActiveXObject() in place of CreateObject() and make other fairly obvious and trivial syntax changes. Note below the doubled \\

    Util.ShellExec(“c:\\usr\\bin\\snmpset.exe”, “1 -c private 192.168.1.221 1.3.6.1.4.1.38783.3.2.0 integer 1”);
    -- Bob

  3. #3
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    33,212

    Default

    Were you able to get this working? I am going through very old issues.
    -- Bob

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sky X Camera Add on Support
    By Colin McGill in forum Pre-Sales Technical Questions and Help
    Replies: 3
    Last Post: Nov 5, 2012, 14:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •