i'm pretty new to tampermonkey and javascript in general. I've also searched on google after an answer for like 1 hour now, and i've gotten no luck. Anyways. The title is pretty self-explanatory. How do I press a key on a keyboard (specifically the "T" button), and then waiting 9.5 seconds, and then repeating it all over again forever? I've also tried to check if this is a duplicate question, but it doesn't seem like it. Tampermonkey, for those of you who don't know, is a chrome extension that injects scripts in to specific sites (you choose which sites). So I could for example add a download button to a youtube video. So the program i'm trying to make would only be injected into a specific site. This is my first time on stackoverflow, and i've heard there are extremely strict rules here, so let me know if I did anything wrong. Cheers, Linus :)
Asked
Active
Viewed 304 times
0
-
Check out this question: https://stackoverflow.com/questions/59623667/simulate-enter-key-in-userscript-tampermonkey – gru Feb 01 '22 at 19:44
-
The only thing you have to do is add a `setTimeout` with this logic in the body. Here is an example: https://developer.mozilla.org/en-US/docs/Web/API/setTimeout – gru Feb 01 '22 at 19:45