Beep until key is pressed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vistro
    New Member
    • Aug 2008
    • 1

    Beep until key is pressed

    I have tried a lot of different ways of doing this.

    I want this part of the script, when reached, to beep once a second (time.sleep(1)) , until a key is pressed (I don't care what key), and once a key has been pressed, continue on with the code.

    Is this even possible???
  • raubana
    New Member
    • Feb 2008
    • 55

    #2
    I'd try making a thread, but that might crash the program.

    Another option is to use pymedia to play a sound file instead of using the computers internal speaker. That way, you won't have to wait between beeps.

    However, you still might have troubles because the beep is in a loop.

    Comment

    Working...