6

I wish to send the following string to cmd:

C:\xampp\mysql\bin\mysql.exe -u root

The problem is to send the colon,

I tried

Send, c:Send, \xampp\mysql\bin\mysql.exe -u root

and

Send, c{:}Send, \xampp\mysql\bin\mysql.exe -u root

But they all turn out to be

Send, c;Send, \xampp\mysql\bin\mysql.exe -u root
1
  • 3
    In general you should use SendInput rather than Send. To prevent translation you can use SendRaw. Escape sequences might also come in handy.
    – Karan
    Dec 23, 2012 at 21:33

1 Answer 1

11

Try escaping with the backquote:

Send C`:\xampp\mysql\bin\mysql.exe -u root

And as a hotstring example:

::x::`:`

Which replaces x with :.

1
  • Pay attention to the difference between ` (accent grave) and ' (single quote). Alternatively, you can use {:}
    – Cadoiz
    May 4, 2020 at 20:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .