Hi,
I have a variable that starts out:
string email = "<p>" +
"<ul>" +
"<li>POSTrxDiscAmt (The Products setting for the discount per POS swipe) = {[@POSTrxDiscAmt]}</li>" +
when attempting to execute:
Keyboard.Press(email);
I receive the error:
Unexpected exception occured: System.ArgumentException: '[@postrxdiscamt]' is not a valid member of the System.Windows.Forms.Keys enumeration.
How would I go about ensuring this just prints the string as I have it?
Thanks,
Jason
Unable to use Keyboard.Press for typing HTML
Re: Unable to use Keyboard.Press for typing HTML
Per the documentation of Keyboard.Press:
So you need to add an extra { and } around your string {[@POSTrxDiscAmt]}Only the '{' character has a special meaning and needs to be escaped by preceding it with another '{' (specify "{{" to issue a '{' key press).
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Unable to use Keyboard.Press for typing HTML
Thank you. I actually did look at the documentation, but clearly was not paying attention...
Jason
Jason
Re: Unable to use Keyboard.Press for typing HTML
Been there done that! I've had more slap myself on the forehead moments than I care to remember sometimes!jlowder wrote:I actually did look at the documentation, but clearly was not paying attention...

If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...