How to know the last key pressed as a character

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
PekkaK
Newbie
Posts: 1
Joined: Thu Mar 17, 2016 8:39 pm

How to know the last key pressed as a character

Post by PekkaK » Thu Mar 17, 2016 9:01 pm

How can I get the character that was pressed in a dialog, not the ascii code but like 'a' ?
I used this:
AddDialogHandler>Dialog1,MSMemo1,OnKeyPress,DoKeyPress
and then with %DoKeyPress_Key% I can get ascii value but I would need the character instead.

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: How to know the last key pressed as a character

Post by JRL » Thu Mar 17, 2016 9:09 pm

Code: Select all

VBEval>chr(%DoKeyPress_Key%),char

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts