Loading ...
Sorry, an error occurred while loading the content.

Re: Keyboard recognition

Expand Messages
  • rod_bird001
    ================================ #m, enable : #m.bd, enable #m.bd, setfocus; when characterInput [getkey] [startloop] start the repeating timer then
    Message 1 of 5 , Jul 31, 2008
    • 0 Attachment
      '================================
      #m, "enable": #m.bd, "enable"
      #m.bd, "setfocus; when characterInput [getkey]"

      [startloop]
      'start the repeating timer then wait for it to happen
      Timer 1000, [decscore]
      wait


      [decscore]
      ' the timer fired do what we have to do then wait again
      SC = SC - 1
      gosub [showscore]
      gosub [checkmusic]
      wait

      [getkey]
      'the keyboard event fired handle it
      'remember to Timer 0 if we need to stop the [decscore] loop
      k$ = Inkey$
      If asc(right$(k$,1)) = 32 and play = 0 then
      Play = 1
      Gosub [click]
      #m.bd, "color red; backcolor red"
      gosub [drawbox]
      Goto [continueon] ' you could just wait if the loop is to continue
      End if

      '==================
    Your message has been successfully submitted and would be delivered to recipients shortly.