Hi Knight.
This is the updated version of Microphone Assistant v1.0.
I could update it more but I'll save that for a later time.
Rem Type=Plugin
Rem Name=Microphone Assistant Plugin v1.0
Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
Rem Host=Assistant
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "You can turn the microphone On or Off by just typing: turn on mic or turn off mic. or you can speak: Turn off microphone but not turn it On through speech. "
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
Rem PLUGIN: PRE-PROCESS
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
'Last updated was Friday, 08-25-2017 @ 4:20PM
If BlockSave = True Then HalBrain.ReadOnlyMode = True
If BlockSave = False Then HalBrain.ReadOnlyMode = False
If InStr(1, InputString, "turn on mic", vbTextCompare) Or _
InStr(1, InputString, "turn on the mic", vbTextCompare) Or _
InStr(1, InputString, "turn on the microphone", vbTextCompare) Or _
InStr(1, InputString, "turn on microphone", vbTextCompare) Or _
InStr(1, InputString, "turn microphone on", vbTextCompare) Or _
InStr(1, InputString, "turn mic on", vbTextCompare) Or _
InStr(1, InputString, "turn mic to on", vbTextCompare) Or _
InStr(1, InputString, "turn microphone to on", vbTextCompare) Or _
InStr(1, InputString, "switch on mic", vbTextCompare) Or _
InStr(1, InputString, "switch on the mic", vbTextCompare) Or _
InStr(1, InputString, "switch on the microphone", vbTextCompare) Or _
InStr(1, InputString, "switch on microphone", vbTextCompare) Or _
InStr(1, InputString, "switch microphone on", vbTextCompare) Or _
InStr(1, InputString, "switch mic on", vbTextCompare) Or _
InStr(1, InputString, "switch mic to on", vbTextCompare) Or _
InStr(1, InputString, "switch microphone to on", vbTextCompare) Or _
InStr(1, InputString, "toggle on mic", vbTextCompare) Or _
InStr(1, InputString, "toggle on the mic", vbTextCompare) Or _
InStr(1, InputString, "toggle on the microphone", vbTextCompare) Or _
InStr(1, InputString, "toggle on microphone", vbTextCompare) Or _
InStr(1, InputString, "toggle microphone on", vbTextCompare) Or _
InStr(1, InputString, "toggle mic on", vbTextCompare) Or _
InStr(1, InputString, "toggle mic to on", vbTextCompare) Or _
InStr(1, InputString, "toggle microphone to on", vbTextCompare) Or _
InStr(1, InputString, " activate microphone", vbTextCompare) Or _
InStr(1, InputString, " activate mic", vbTextCompare) Then
BlockSave = True
HalCommands = HalCommands & "<MICON>"
UltraHal = "The Microphone has been activated. "
Exit Function
End If
BlockSave = False
If InStr(1, InputString, "turn off mic", vbTextCompare) Or _
InStr(1, InputString, "turn off the mic", vbTextCompare) Or _
InStr(1, InputString, "turn off the microphone", vbTextCompare) Or _
InStr(1, InputString, "turn off microphone", vbTextCompare) Or _
InStr(1, InputString, "turn microphone off", vbTextCompare) Or _
InStr(1, InputString, "turn mic off", vbTextCompare) Or _
InStr(1, InputString, "turn mic to off", vbTextCompare) Or _
InStr(1, InputString, "turn microphone to off", vbTextCompare) Or _
InStr(1, InputString, "switch off mic", vbTextCompare) Or _
InStr(1, InputString, "switch off the mic", vbTextCompare) Or _
InStr(1, InputString, "switch off the microphone", vbTextCompare) Or _
InStr(1, InputString, "switch off microphone", vbTextCompare) Or _
InStr(1, InputString, "switch microphone off", vbTextCompare) Or _
InStr(1, InputString, "switch mic off", vbTextCompare) Or _
InStr(1, InputString, "switch mic to off", vbTextCompare) Or _
InStr(1, InputString, "switch microphone to off", vbTextCompare) Or _
InStr(1, InputString, "toggle off mic", vbTextCompare) Or _
InStr(1, InputString, "toggle off the mic", vbTextCompare) Or _
InStr(1, InputString, "toggle off the microphone", vbTextCompare) Or _
InStr(1, InputString, "toggle off microphone", vbTextCompare) Or _
InStr(1, InputString, "toggle microphone off", vbTextCompare) Or _
InStr(1, InputString, "toggle mic off", vbTextCompare) Or _
InStr(1, InputString, "toggle mic to off", vbTextCompare) Or _
InStr(1, InputString, "toggle microphone to off", vbTextCompare) Or _
InStr(1, InputString, "deactivate microphone", vbTextCompare) Or _
InStr(1, InputString, "deactivate mic", vbTextCompare) Then
BlockSave = True
HalCommands = HalCommands & "<MICOFF>"
UltraHal = "The Microphone has been deactivated. "
Exit Function
End If
BlockSave = False
Jerry 8)