ABC Test Program - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

ABC Test Program

PajniPajni Posts: 2Member
Hi, Im making a program were you can test how fast you can type the alphabeticts(spelling?)

Anyways, I got stuck. I was thinking of a TTimer to check what keys are pressed and in the correct order every ms. As for were I got stuck I don not know what code I should use. Here is a little example of what I mean, but its not functioning. anyways, If the user press wrong key the user fails. Hope I explained good :S

If key 'a' then
if key 'b' then
if key 'c' then

etc

else label1.caption:='Failure';

just wrote this as a quick example of what I mean.

Comments

  • IDKIDK Posts: 1,784Member
    : Hi, Im making a program were you can test how fast you can type the alphabeticts(spelling?)
    :
    : Anyways, I got stuck. I was thinking of a TTimer to check what keys are pressed and in the correct order every ms. As for were I got stuck I don not know what code I should use. Here is a little example of what I mean, but its not functioning. anyways, If the user press wrong key the user fails. Hope I explained good :S
    :
    : If key 'a' then
    : if key 'b' then
    : if key 'c' then
    :
    : etc
    :
    : else label1.caption:='Failure';
    :
    : just wrote this as a quick example of what I mean.
    :
    I have done the same thing in basic.
    If you are interested I could give
    you the code.

    I did with a smart sulution in ascii.

    [b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]

  • PajniPajni Posts: 2Member
    actually I got it working now by "cheating" I did an mainmenu1 with the keys binded to each letter. The "code" I used so the user cant cheat or anything like that I just used:

    b.enabled:=true
    a.enabled:=false

    etc on every key.

    But this doesnt really stop the player from failing when the wrong key is pressed.

    anyways, I got a newbieproblem here, as if the other question wasnt =)

    this code:

    Memo1.lines.Add:=inttostr(sec)+':'+inttostr(hundradel);

    doens work, what did I miss ?
Sign In or Register to comment.