I'm attempting to send the { key using SendKeys.SendWait(y). I'm passing a variable, y in this case, that has been set with a string containing {.
string y = "u8HXV/gIE_{";
SendKeys.SendWait(y);
SendKeys.SendWait("{TAB}");
SendKeys.SendWait("{ENTER}");
I'm getting the following error:
An exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll
but was not handled in user code
Additional information: Keyword delimiter is missing.
Is there a way of escaping this keyword { within SendKeys?
The curly brace is a special symbol for the SendKeys method, so you need to escape it (treat it like special symbol) like this:
SendKeys.SendWait("{{}");
The output is: {
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With