Announcement

Collapse
No announcement yet.

Scripting error on output toggle

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

    Scripting error on output toggle

    Hi ALL

    I've used the code snippet provided by Ultra to toggle an output via a script.

    Sub Main(ByVal parm As Object)
    Dim strResults As String = ""
    ' Toggle Output 17
    strResults = hs.plugin("UltraM1G").ControlOutput("017","Toggle","0")
    If strResults.Length > 0 Then
    Call hs.WriteLog("Error", strResults)
    End If
    End Sub

    I put this into a text file and am calling this from an event. I get the following error:

    6/10/2007 8:34:04 PM - Error - Running script, script run or compile error in file: Output017_toggle.txt1006:Expected ')' in line 1 More info: Expected ')'

    Could someone please point out what I'm missing....

    Many thanks..Peter
    HS 2.2.0.11

    #2
    Shouldn't you be putting this into a .vb file?

    Comment


      #3
      Fuego... I've got no idea....Linux shell scripting, no issues... under windows... no idea !
      HS 2.2.0.11

      Comment


        #4
        The samples I provided are vb.net. The script file extension should be .vb
        Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

        Comment


          #5
          Hi Ultra

          Ok, that works. What then happens when the extension is changed to .vb ? Is a different script engine called if the extension is different ?

          Sorry I dont know much about windows scripting as such..if it were LInux shell, different story...

          Thanks for your quick response....

          Pete
          HS 2.2.0.11

          Comment


            #6
            Originally posted by petez69 View Post
            Hi Ultra

            Ok, that works. What then happens when the extension is changed to .vb ? Is a different script engine called if the extension is different ?

            Sorry I dont know much about windows scripting as such..if it were LInux shell, different story...

            Thanks for your quick response....

            Pete
            Yes. .txt = VBScript engine, .vb = VB.Net engine.

            Comment

            Working...
            X