Tutorial Downloads

File Size
tutorial (ext).capx176KB
tutorial.capx172KB
selected.png0KB
unselected.png0KB

Translations

Know another language? Translate this tutorial!

Stats

1,150 visitors
11.5K page views
298 translation visitors
2,218 translation page views

Your own textbox

Favourite 11 favourites
Tutorial written by WaltanOriginally published on 5th, December 2013 - 1 revision

Basis

What you will need:
- ASCII Conventer online

Dont like standard html textbox? Let's make your own! Everything is much simpler than it seems.

For this example you will need only 2 objects. Keyboard and text object. Name it "source".


Now open Event sheet. Our first event will be:

On any key pressed -> source: append Keyboard.StringFromKeyCode(Keyboard.LastKeyCode)


Keyboard.StringFromKeyCode(Keyboard.LastKeyCode) - this may look scary.
Let's analyze in detail:

Keyboard.LastKeyCode - will return character ASCII code
For example:
if you press on your keyboard...
A it will return 65
B will return 66
! will return 33

Keyboard.StringFromKeyCode - will return string describing the character of the specified ASCII code
For example:
Keyboard.StringFromKeyCode(65) = A
Keyboard.StringFromKeyCode(33) = !
Keyboard.StringFromKeyCode(37) = %

So we combined these two expressions and that's what we got:


It shows every button which we press. Now we need to separate symbols that we need.

All English characters (in upper case) have ASCII codes from 65 to 90.


Now by using "System -> Compare two values" we can add two conditions.


Now it displays only letters.

Share and Copy this Tutorial

You are free to copy, distribute, transmit and adapt this work with correct attribution. Click for more info.

Comments

0
Lordshiva1948 41.5k rep

Thanks for sharing nice tutorial

Thursday, December 05, 2013 at 8:41:44 PM
0
Waltan 7,995 rep

I will add more useful tricks later.

Friday, December 06, 2013 at 9:58:03 AM
0
fawdda 3,967 rep

Well done.

Friday, December 06, 2013 at 11:18:48 AM
0
PaulPoy 4,612 rep

Nice. Thank you.

Wednesday, December 25, 2013 at 11:12:19 AM

Leave a comment

Everyone is welcome to leave their thoughts! Register a new account or login.