3 ms·
How are you emulating the clicking?
by albertshin 7y ago
How are you emulating the clicking?
- mbrumlow 7y agoI normally write a c program or go linked to xlib to do this sort of work, but I just used xdotool in a bash script for this. https://gist.github.com/mbrumlow/49f0a3fa311cc3002e4e1fae2e290b3b https://gist.github.com/mbrumlow/49f0a3fa311cc3002e4e1fae2e2...
- albertshin 7y agothanks! didn't know about xdotool
- kojackst 7y agoThis runs it randomly 1000 times (well not reaaally randomly, but it gets close), just paste it into the browser console: const times = 1000; function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } async function run() { for (let i = 0; i < times; i++) { await sleep(10); play(Math.floor(Math.random()*3)); } } run();