0

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?

Community
  • 1
  • 1
Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501

1 Answers1

1

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
Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501