Skip to content
Advertisement

program simulating keypress numbers 1 – 999

so I have this program where what I want it to do is simulate keypress of numbers from 1 – 999 but it does not seem to work and it stopped working when it is supposed to type the number 10 and I am not sure how to fix it code:

JavaScript

Advertisement

Answer

press and release only accept one character. Try changing it to type:

JavaScript

You can also use the pyautogui or the keyboard module.

With pyautogui

JavaScript

With keyboard

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement