PDA

View Full Version : Getting RETURN On_Key from Input object



christhomas
11-02-2008, 07:04 AM
Hi, I need to know when a user presses Return in an input dialogue. Ideally there would be way to find the last character inputted i.e. "\r" and then trigger an action based on this.

I need this as I want to be able to trigger the display of a HTML help page when a new user uses my app. I can tell their new by checking their record in my database. But for that I need their email address, and I need to know this has been positively entered by the user pressing ENTER.

Any ideas?

Cheers

CT

Centauri Soldier
11-02-2008, 10:19 AM
Put the following code into the "On Key" event of your input object.


if e_Key == 13 then -- return

--YOUR CODE HERE

end

check your AMS help file and look up "key codes" in the index for other keys.

christhomas
11-02-2008, 12:30 PM
Thanks, yes, that works a treat :)

Cheers

CT