Announcement

Collapse
No announcement yet.

HS3 BLSpeech Pre-Speak script not working

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

    HS3 BLSpeech Pre-Speak script not working

    Below is my simple script that I have been using for years for HS2 with some minor mods to adapt it to HS3. I am getting this error:

    Running script blSpeech_PreSpeak_3.vb :Exception has been thrown by the target of an invocation.->Does entry point Main 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()

    What am I missing here???


    Public Sub Main(Parm As Object)


    hs.SetVoice("VW Kate 16K")


    Select Case hs.DeviceValue("R50") ' amnnounceType


    Case 0 'no speakers or intercom (sound is local only)


    Case 1 'inside speakers and intercom inside
    hs.RunScriptFunc("sendSG_ASCII_3.vb", "Main", "RY02||ON", True, False) 'intercom on
    hs.SetDeviceValue("G5", 0) ' inside speakers on


    Case 2 'inside and outside speakers and intercom (ALL ON)
    hs.RunScriptFunc("sendSG_ASCII_3.vb", "Main", "RY03||ON", True, False) 'intercom door on
    hs.SetDeviceValue("G4", 100) ' outside speakers on
    hs.SetDeviceValue("G5", 0) ' inside speakers on


    End Select

    End Sub

    #2
    Code:
    Public Sub Main(ByVal Parm As Object)
    
        hs.SetVoice("VW Kate 16K")
    
        Select Case hs.DeviceValue("R50") ' amnnounceType
            Case 0 'no speakers or intercom (sound is local only)
            Case 1 'inside speakers and intercom inside
                hs.RunScriptFunc("sendSG_ASCII_3.vb", "Main", "RY02||ON", True, False) 'intercom on
                hs.SetDeviceValue("G5", 0) ' inside speakers on
            Case 2 'inside and outside speakers and intercom (ALL ON)
                hs.RunScriptFunc("sendSG_ASCII_3.vb", "Main", "RY03||ON", True, False) 'intercom door on
                hs.SetDeviceValue("G4", 100) ' outside speakers on
                hs.SetDeviceValue("G5", 0) ' inside speakers on
        End Select
    
    End Sub
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    Comment


      #3
      I was able to solve it by changing to DeviceValueEx(132) instead of DeviceValue("R50")
      It's working fine now.

      Public Sub Main(Parm As Object)
      hs.SetVoice("VW Kate 16K")
      Select Case hs.DeviceValueEx(132) ' announceType
      Case 0 'no speakers or intercom (sound is local only)
      Case 1 'inside speakers and intercom inside
      hs.RunScriptFunc("sendSG_ASCII_3.vb", "Main", "RY02||ON", True, False) 'intercom on
      hs.SetDeviceValue("G5", 0) ' inside speakers on
      'Case 2 'inside and outside speakers and intercom (ALL ON)
      hs.RunScriptFunc("sendSG_ASCII_3.vb", "Main", "RY03||ON", True, False) 'intercom door on
      hs.SetDeviceValue("G4", 100) ' outside speakers on
      hs.SetDeviceValue("G5", 0) ' inside speakers on
      End Select
      End Sub

      Comment

      Working...
      X