Announcement

Collapse
No announcement yet.

Creating scripts for the Pi?

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

    Creating scripts for the Pi?

    Can someone post the format of a working script that the Pi runs? I get error's like no namespace, no end class, when the script has only a sub main() ... end sub

    Any help with this is greatly appreciated. Thanks

    Code:
    sub Main()
    
    hs.speak "Hello"
    
    end sub
    6/23/2022 7:41:49 PM HomeSeer Error Compiling script (1)Good_Morning.vb: 'End Namespace' must be preceded by a matching 'Namespace'.
    6/23/2022 7:41:49 PM HomeSeer Error Compiling script (1)Good_Morning.vb: Identifier expected.
    6/23/2022 7:41:49 PM HomeSeer Error Compiling script (1)Good_Morning.vb: Expected 'Class'.
    6/23/2022 7:41:49 PM HomeSeer Error Compiling script (1)Good_Morning.vb: Expected 'End'.
    6/23/2022 7:41:49 PM HomeSeer Error Compiling script (1)Good_Morning.vb: End of statement expected.
    6/23/2022 7:41:48 PM HomeSeer Event Running script in background (Speak Current Weather): Good_Morning.vb("sub Main()")

    -Skybolt

    #2
    There are two flavors of VB, VBScript and VB.Net. Both will work on Windows platforms, but only VB.Net run under HS-Linux.

    The VB.Net version of what you posted is similar,

    Code:
    Sub Main(p As Object)
    
        hs.Speak("Hello")
    
    End Sub

    Comment


      #3
      Originally posted by zwolfpack View Post
      There are two flavors of VB, VBScript and VB.Net. Both will work on Windows platforms, but only VB.Net run under HS-Linux.

      The VB.Net version of what you posted is similar,

      Code:
      Sub Main(p As Object)
      
      hs.Speak("Hello")
      
      End Sub
      Thank you! I did not think the calling parameter was needed and didn't try that. I should have known better about the paren's
      Thanks again.
      -Skybolt

      Comment

      Working...
      X