Debugging 如何从WSR中的Alternates面板输出推断调试信息

Debugging 如何从WSR中的Alternates面板输出推断调试信息,debugging,windows-vista,speech-recognition,Debugging,Windows Vista,Speech Recognition,我有一个Windows语音识别(WSRMacro)脚本,它将多个单词合成为一个单词: "Happy children" -> "Happychildren" 但是,在某些情况下脚本中会出现错误,我不知道如何推断问题所在。尽管上述示例有效,但以下情况并不适用: "Happy children bake a cake" 此时会出现Alternates面板,并显示以下提示,而不是如上所述的复合词: -> Alternates Panel (Say the number next to

我有一个Windows语音识别(WSRMacro)脚本,它将多个单词合成为一个单词:

"Happy children"
-> "Happychildren"
但是,在某些情况下脚本中会出现错误,我不知道如何推断问题所在。尽管上述示例有效,但以下情况并不适用:

"Happy children bake a cake"
此时会出现Alternates面板,并显示以下提示,而不是如上所述的复合词:

-> Alternates Panel (Say the number next to the item you want followed by OK): 
(1) Replace that withhappychildrenbakeacake
(2) replace that withhappychildrenbakeacake
(3) replace that with no space happy no space 
    children no space bake no space a no space cake
我可以从上面的Alternates面板输出推断出下面脚本中的任何特定错误吗

或者我可以在脚本中添加一些东西来获得关于bug性质的更有用的反馈

  <command priority="5">
    <listenFor>compound that</listenFor>
    <emulateRecognition>select that</emulateRecognition>
    <sendKeys>{250 WAIT}{{CTRL}}c{250 WAIT}</sendKeys>
    <script language="VBScript">
      <![CDATA[
      that = Application.clipboardData.GetData("text")
      Set regEx = New RegExp
      regEx.Pattern = "[^\s\w,;:]"
      If regEx.Test(that) Then
        Application.SetTextFeedback("Try again without any punctuation selected")
      Else
        regEx.Pattern = "(\s) *(\S)"
        regEx.Global = True
        that = regEx.Replace(" " & that, "$1no space $2")
        On Error Resume Next
        Application.EmulateRecognition("replace that with" & that)
        If 0 <> Err.Number Then
          Application.SetTextFeedback("Try again with only the digits selected")
        End If
      End If
    ]]>
    </script>
  </command>

复合
选择那个
{250等待}{{CTRL}}c{250等待}
呃,那么是多少
Application.SetTextFeedback(“仅选择数字重试”)
如果结束
如果结束
]]>

听起来您正试图在本机不支持文本服务框架的应用程序中使用它

更严重的是,为什么不使用内置命令“从该位置删除空格”或“连接该位置”