Announcement

Collapse
No announcement yet.

Errors with Jon00AppControl.vben("main","3")

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

    Errors with Jon00AppControl.vben("main","3")

    HT2 running 2.2.0.76 I see the following error:

    Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Conversion from string "" to type 'Double' is not valid. ---> System.FormatException: Input string was not in a correct format. at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDoub le(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble( String Value, NumberFormatInfo NumberFormat) --- End of inner exception stack trace --- at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble( String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble( String Value) at scriptcode2.scriptcode2.Main(Object Parms) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments)

    #2
    Please post the ini file that you are using as without it I cannot determine what is wrong.
    Jon

    Comment


      #3
      [App1]
      AppProcessName = "msimn"
      AppPath="|"
      AppClose = 1
      AppCloseWaitTime = 5
      AppForce = 1
      AppForceWaitTime = 5
      AppRestart = 0
      AppRestartDelay = 0
      RestartPC = 0
      AppPriority = 0
      EventRunning = ""
      EventNotRunning = ""
      Logging = 1

      [App2]
      AppProcessName = "notepad"
      AppPath="|"
      Parameters = ""
      AppClose = 1
      AppCloseWaitTime = 5
      AppForce = 1
      AppForceWaitTime = 5
      AppRestart = 0
      AppRestartDelay = 0
      RestartPC = 0
      AppPriority = 0
      EventRunning = ""
      EventNotRunning = ""
      Logging = 1

      [App3]
      AppProcessName = "iexplore"
      AppPath = "|"
      Parameters = ""
      AppClose = 0
      AppCloseWaitTime = 1
      AppForce = 0
      AppForceWaitTime = 1
      AppRestart = 0
      AppRestartDelay = 1
      RestartPC = 0
      AppPriority = 0
      EventRunning = "Kill IE"
      EventNotRunning = ""
      Logging = 1

      [App4]
      AppProcessName = "iexplore"
      AppPath = "|"
      Parameters = ""
      AppClose = 0
      AppCloseWaitTime = 1
      AppForce = 1
      AppForceWaitTime = 30
      AppRestart = 0
      AppRestartDelay = 1
      RestartPC = 0
      AppPriority = 0
      EventRunning = ""
      EventNotRunning = ""
      Logging = 1

      Comment


        #4
        You have not specified in the ini file what you want to do with the application. If you want to close it, make sure AppClose = 1 and/or AppForce = 1
        Jon

        Comment


          #5
          Yes I have. Its detecting if IE is running, and if so, executing event "Kill IE". This worked perfectly under same HS version on PC. Errors started with HT2.

          [App3]
          AppProcessName = "iexplore"
          AppPath = "|"
          Parameters = ""
          AppClose = 0
          AppCloseWaitTime = 1
          AppForce = 0
          AppForceWaitTime = 1
          AppRestart = 0
          AppRestartDelay = 1
          RestartPC = 0
          AppPriority = 0
          EventRunning = "Kill IE"
          EventNotRunning = ""
          Logging = 1

          Comment


            #6
            Ahh OK. It's getting late here

            I notice on another thread that DooCPUMonitor is not working on the HT2 and probably my Performance Monitor script will fail also. Looks like HST have stripped out the M$ performance counter utilities from this unit which all these applications require. If so, there is not much I can do.
            Jon

            Comment


              #7
              Originally posted by jon00 View Post
              Ahh OK. It's getting late here

              I notice on another thread that DooCPUMonitor is not working on the HT2 and probably my Performance Monitor script will fail also. Looks like HST have stripped out the M$ performance counter utilities from this unit which all these applications require. If so, there is not much I can do.
              Your Process Monitor is working just fine. It's just this scripting issue (that's only needed because IE is evil). I'll be happy to test anything out for you.

              Comment


                #8
                I'll take a look at the code tomorrow. It may not even be a HT issue rather than the beta version software they have supplied you with.

                BTW, can you not Kill IE by forcing it with my application?
                Jon

                Comment


                  #9
                  I don't think its the beta, as I ran the same version on a PC with no problem. It could be a different .NET version though....

                  The script does kill the process, just get these errors.

                  Comment


                    #10
                    Are you sure you are on 2.2.0.76? Look at this post from Rich: http://forums.homeseer.com/showpost....99&postcount=5
                    Jon

                    Comment


                      #11
                      Yes, I installed it myself. It actually shipped with 2.2.0.66 BTW

                      The later betas I don't use as they hosed the ability of the Insteon plugin to have devices defined in a vbscript (Insteon Sprinkler Controller). So, I'm staying with 2.2.0.76 for now.

                      Comment


                        #12
                        I looked at the code and cannot see anything wrong? It's working fine here on my HT1 without error. It's difficult to diagnose as I cannot test it against anything.

                        As you have logging enabled, does it show in the log that the event has been triggered?

                        Do you use the script in any other way and if so does it error with that too?

                        If you put in a non-existent ini file entry i.e. ("main,"99") does that error?

                        Also try ("main",3) as a parameter.
                        Jon

                        Comment

                        Working...
                        X