Announcement

Collapse
No announcement yet.

tenscripting error newbie following video

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

  • sirbooker
    replied
    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.

    Leave a comment:


  • tenholde
    replied
    Please review this video: http://tenholder.net/tenScriptingError.mp4

    Leave a comment:


  • tenholde
    replied
    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?

    Leave a comment:


  • ewkearns
    replied
    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

    Leave a comment:


  • sirbooker
    started a topic tenscripting error newbie following video

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