Announcement

Collapse
No announcement yet.

RunScript in a script

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

    RunScript in a script

    Just can't seem to get this without errors! - complaining "does main exist"?
    I've searched the forum and seen this used before without a problem...


    Calling script has

    hs.RunScript("porch screen.vb",TRUE, FALSE)


    porch screen.vb

    Public sub Main(parms As object)

    hs.WriteLog("Process Porch Screen")

    End sub

    #2
    The WriteLog function takes two string parameters. Try something like, hs.WriteLog( "Test", "Process Porch Screen") to see if that resolves the issue.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      Originally posted by Uncle Michael View Post
      The WriteLog function takes two string parameters. Try something like, hs.WriteLog( "Test", "Process Porch Screen") to see if that resolves the issue.
      OH %$$%!!! You are correct!!
      I really hate the lack of error reporting that this vb.net gives.

      Much appreciated! There I was checking my parameter passing etc. not looking at the writelog at all!!

      Comment


        #4
        I agree, the vb.net error messages are often less that helpful. There is a tool called TenScripting, that allows you to write HS scripts in the Visual Studio environment. It provides command auto complete, error highlighting, etc. as you work.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          Originally posted by Uncle Michael View Post
          I agree, the vb.net error messages are often less that helpful. There is a tool called TenScripting, that allows you to write HS scripts in the Visual Studio environment. It provides command auto complete, error highlighting, etc. as you work.
          Having done lots of assembler and C I find these new(ish) languages lacking. After all the error was incorrect number of parameters to write log - would of thought in 2020 that wouldn't be an issue to flag up.
          Still! - VB.NET it is!

          Once again appreciate your help! - there's tons of good information and help on this forum!

          Comment


            #6
            Originally posted by Pocster View Post
            . . . I find these new(ish) languages lacking. After all the error was incorrect number of parameters to write log - would of thought in 2020 that wouldn't be an issue to flag up.
            It is my impression that MS expects programming to be done within a utility like Visual Studio so that errors of this type are caught before the compiler stage. (On the other hand, Windows error messages aren't terribly informative either much of the time, so maybe MS just doesn't think informative error messages are very important. )

            Mike____________________________________________________________ __________________
            HS3 Pro Edition 3.0.0.548, NUC i3

            HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

            Comment


              #7
              This inability to tell you where an error occurred, and what error, is because of the HS implementation, not the .net compilers.

              tenScripting now supports C# scripting.
              tenholde

              Comment


                #8
                Originally posted by tenholde View Post
                This inability to tell you where an error occurred, and what error, is because of the HS implementation, not the .net compilers.

                tenScripting now supports C# scripting.
                Thanks. I'll take a look at that!

                Comment


                  #9
                  Originally posted by Pocster View Post

                  Having done lots of assembler and C I find these new(ish) languages lacking. After all the error was incorrect number of parameters to write log - would of thought in 2020 that wouldn't be an issue to flag up.
                  Still! - VB.NET it is!

                  Once again appreciate your help! - there's tons of good information and help on this forum!
                  Java yesterday, Java today, Java forever.


                  Jim Speiser
                  35-year veteran of Home Automation
                  Still don't know squat

                  Comment

                  Working...
                  X