naturallyspeaking

How can I send a tilde in advanced scripting?


I want to send a tilde in Dragon NaturallySpeaking's advanced scripting. I tried SendKeys "~", but ~ is replaced by a ENTER keystroke, as expected.

Example:

Sub Main
    SendKeys "source ~/.bash_profile"
End Sub

enter image description here

How can I send a tilde in advanced scripting?


Solution

  • You can use {} as escape characters, e.g., SendKeys "{~}". By the same token, you would use SendKeys "{+}", SendKeys "{^}", and SendKeys "{%}", to send a plus sign, a caret, and a percentage sign, respectively.

    As a result, your example becomes:

    Sub Main
        SendKeys "source {~}/.bash_profile"
    End Sub