sendkeysnaturallyspeaking

How to send a right curly bracket with Dragon NaturallySpeaking's advanced scripting?


How to send a right curly bracket (i.e., }) with Dragon NaturallySpeaking's advanced scripting?

MSDN's document on the SendKeys Statement says:

To specify brace characters, use {{} and {}}.

Sending a left curly bracket (i.e., {), works fine with the following advanced scripting command:

Sub Main
    SendKeys "{{}"
End Sub

However, when I try to do the same for the right curly bracket (i.e., }), it doesn't work:

Sub Main
    SendKeys "{}}"
End Sub

Why?

enter image description here

enter image description here


Solution

  • This is an old glitch in Advanced Scripting.

    You can use the ASCII code instead:

    Sub Main
    SendKeys Chr(125), True
    End Sub