Announcement

Collapse
No announcement yet.

Using E_Key correctly.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using E_Key correctly.


    Hi, I'm using Google Translate. I would like to use e_Key for when I press Enter, it will check if the text was typed correctly in the text field, if the user presses enter and the text is correct it will advance to the next page, if it is wrong it will display a text message saying it's wrong. See my code, I believe that as there are two "ifs" very close together, it gives the error message. How can I improve the code so that when I press Enter it will check if the text typed is correct or not, and go to the next page?
    volume_up
    content_copy

    share
    star_border
    Attached Files

  • #2
    Each "if" needs to have one "end". You have two "if" but only one "end". You need to place the missing "end" where it should be.

    Ulrich

    Comment


    • #3
      Originally posted by Ulrich View Post
      Each "if" needs to have one "end". You have two "if" but only one "end". You need to place the missing "end" where it should be.

      Ulrich
      OMG, i just write end on the "end" and just words! Thanks! Brazilian greetings!

      Comment


      • #4

        write this code to input on key


        if e_Key == 13 then
        correct = "xxx"
        written = Input.GetText("Input1");
        if written == correct then
        Page.Jump("Page2");
        else
        Dialog.Message("Durum :", "Kod Yanlış", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
        end
        end

        Comment

        Working...
        X