Announcement

Collapse
No announcement yet.

Run another script

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

    Run another script

    Hello I am having problems, please can someone help me with my code.

    Error 3 Running script C:\Program Files (x86)\HomeSeer HS3\scripts\security.vb :Exception has been thrown by the target of an invocation.->Does entry point readytoArm exist in script? at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Obj ect obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at A.c17b105f989efe61e5979e67bec1ef734.cffd66cb0782c50126727e3f a75582d7a()

    security.vb:
    Code:
    		' Speaks the list of Problems
    		For Each valueOfArrayList As String In problemString
    			hs.WriteLog("Security Script", valueOfArrayList)
    			hs.runEx("sonos.vb","speakSomething","bathroom|45|what possibly could go wrong|Normal") 
    		Next
    sonos.vb
    Code:
    '---------------------------------------------------------------------------
    ' Speak Method using Pipes to Seperate Values ( Speaker | Volume | TTS String | Voice )
    '---------------------------------------------------------------------------
    Sub speakSomething(ByVal Parms As Object)
    
    Dim parmArray() As String = Parms.ToString.Split("|")

    Please note the ArrayList works when commenting the hs.runEx

    Please note the bathroom|45|what possibly could go wrong|Normal works when testing in a manual event, the exception is that in an event in the parameters I don't use quotations "bathroom|45|what possibly could go wrong|Normal", I use: bathroom|45|what possibly could go wrong|Normal

    Removing these didn't work.

    Thanks
    Chris

    #2
    Typical I searched for ages, then I post this and 10 minutes later find the the answer.
    https://board.homeseer.com/showthread.php?t=177696

    hs.regEx seems to be replaced (explains why I could not find it in the Help) - this is better as the Wait and Single Instance Booleans
    http://homeseer.com/support/homeseer...lp/default.htm

    Code:
    ' Speaks the list of Problems
    		For Each valueOfArrayList As String In problemString
    			hs.WriteLog("Security Script", valueOfArrayList)
    			hs.RunScriptFunc("sonos.vb","speakSomething","bathroom|45|" & valueOfArrayList & "|Normal",true,true) 
    		Next

    Comment

    Working...
    X