Announcement

Collapse
No announcement yet.

tenscripting error newbie following video

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

    tenscripting error newbie following video

    this is what i have

    Public Class Newscriptname
    Public Sub Main(ByVal Parms As Object)
    Dim ParmArray(10) As String
    '' Extract script parameters into ParmArray()
    ParmArray(0) = ""
    If Parms.ToString.Contains("|") Then
    ParmArray = Parms.ToString.Split(Convert.ToChar("|"))
    Else
    ParmArray(0) = Parms.ToString
    End If

    hs.WriteLog("turning On the light", "scriptrunning")
    If hs.DeviceValueEx(hs.GetDeviceRefByName("EnvisaLink Shock Sensor Z6")) = 1 Then
    hs.CAPIControlHandler(hs.CAPIGetSingleControl(hs.GetDeviceRe fByName("Lights office Office Light"), True, "On", False, False))

    End If
    End Sub
    End Class

    and I get an error message

    BC30188 Declaration expected

    Microsoft Visual Studio Community 2019
    Version 16.6.3

    Thanks
    Paul.

    #2
    OK, I am absolutely the LAST person qualified to give you help on programming, but this link may lead you to a point of self-help

    https://docs.microsoft.com/en-us/dot...ation-expected
    HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
    Home Assistant 2024.3
    Operating System: Microsoft Windows 11 Pro - Desktop
    Z-Wave Devices via two Z-Net G3s
    Zigbee Devices via RaspBee on RPi 3b+
    WiFi Devices via Internal Router.

    Enabled Plug-Ins
    AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

    Comment


      #3
      Originally posted by sirbooker View Post
      this is what i have


      hs.CAPIControlHandler(hs.CAPIGetSingleControl(hs.GetDeviceRe fByName("Lights office Office Light"), True, "On", False, False))

      There is a space in the middle of the GetDeviceRefByName. This may be just from your creating the post.

      I copied exactly what you posted into a tenScripting .vb script file, eliminated the space, and I get no compile errors. I ran tenScripting and selected your code to run, and it ran ok. Writelog was executed, although the rest of the logic wouldn't work for me as I don't have that device in my HS system.

      Where were you seeing the BC30188 error. Before you ran the tenScripting project? While running it? Or, in the log when running it from an HS Event?
      tenholde

      Comment


        #4
        Please review this video: http://tenholder.net/tenScriptingError.mp4

        tenholde

        Comment


          #5
          Thank You very much tenhole ,the little video explaining it was great.
          i hope you do more videos in the future
          >>Where were you seeing the BC30188 error. when i clicked on start it would try an compile and then stop.
          below on the screen i would see the error.
          i am going to watch the video again and repeat my steps to see what happen
          have not coded a day in my life until now
          Paul.

          Comment

          Working...
          X