Announcement

Collapse
No announcement yet.

Passing Disarm code from HSTouch to DSC Plugin

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing Disarm code from HSTouch to DSC Plugin

    Hello,
    I am new to writing scripts and I have created an HSTouch screen where I can have someone type in their alarm code to arm/disarm the system, then saves it in parm(0) and then passes it to the script. I wondered if you could take a quick look at it to make sure I'm doing this correctly. I'm using the code Spud had in the DSC user guide.

    I've attached below a screen where I pull in the code from an HSTouch element and then run the below script:

    Sub Main(ByVal parm As Object)
    Dim inputcode
    inputcode = parm(0).ToString 'Gets input code from HST
    hs.PluginFunction("EnvisaLink", "", "SendKeystrokeString", new object[] { 1, inputcode]);return 0;

    End Sub
    Attached Files
    HS3 3.0.0.500 &HSTouch Designer 3.0.71 with 782 Devices, 479 Events
    Plugin's:
    BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee,
    EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
    weatherXML, Jon00 Alexa Helper, Network Monitor, Z-Wave 3.0.1.252

  • #2
    I don't know if this is it, but it looks like your curly brace is closed with a square bracket:

    { 1, inputcode]

    Comment


    • #3
      also, the example from the user guide is a C# script, here you are using VB, so I think the call to the plugin function should be:

      Code:
      hs.PluginFunction("EnvisaLink", "", "SendKeystrokeString", new Object() { 1, inputcode})

      Comment


      • #4
        Originally posted by spud View Post
        also, the example from the user guide is a C# script, here you are using VB, so I think the call to the plugin function should be:

        Code:
        hs.PluginFunction("EnvisaLink", "", "SendKeystrokeString", new Object() { 1, inputcode})
        Thank you for the help! I've attached what I believe to be a vb script that includes all the above.
        Attached Files
        HS3 3.0.0.500 &HSTouch Designer 3.0.71 with 782 Devices, 479 Events
        Plugin's:
        BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee,
        EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
        weatherXML, Jon00 Alexa Helper, Network Monitor, Z-Wave 3.0.1.252

        Comment

        Working...
        X