Announcement

Collapse
No announcement yet.

Passing Disarm code from HSTouch to DSC Plugin

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

  • The Profit
    replied
    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

    Leave a comment:


  • spud
    replied
    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})

    Leave a comment:


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

    { 1, inputcode]

    Leave a comment:


  • The Profit
    started a topic Passing Disarm code from HSTouch to DSC Plugin

    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
Working...
X