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
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

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
94
S
33
G
123
Posts: 5,452
Reputation: 78,467

Post » Sun Mar 23, 2014 8:58 am

@R0J0hound

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


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests

cron