Adding ASCII codes to Textbox.text

Get help using Construct 2

Post » Sat Mar 22, 2014 4:49 pm

Hi,
i am creating an on screen keyboard to allow controller users to enter their name using the controller only. Entering normal text letters as strings is easy however i wanted to also use Ascii codes to allow the use of the space.. backspace and return keys. Similar to the Basic Chr$(13) for instance.

How can i enter these codes into the textbox? Is there a way using CSS? Or is there an different way altogether ?

Thanks
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Sat Mar 22, 2014 6:36 pm

You can use Browser.ExecJS("'\x41'") to do any ascii letter from a two digit hex. In this case it's "A".

It's not needed though since you can use " " and newline. Backspace seems it would be useful but it does nothing in javascript. You'll have to do something link set text to left(text, len(text)-1) instead.
B
92
S
32
G
110
Posts: 5,298
Reputation: 71,507

Post » Sun Mar 23, 2014 8:58 am

@R0J0hound

Thats great ,thanks for the quick reply :-)
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197


Return to How do I....?

Who is online

Users browsing this forum: JackTYGA, zill and 34 guests