![]() |
[split] Accurate Clicks Per Second - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Game Development (https://python-forum.io/forum-11.html) +--- Thread: [split] Accurate Clicks Per Second (/thread-31573.html) |
[split] Accurate Clicks Per Second - Hamti - Dec-20-2020 In My opinion it is always hard to implement code in python. I am working in python to make a click per second tool but it shows Multiple errors in integration.So I use Javascript and make this tool in a single day without any bug. Tool Link:https://clickspeeder.com/click-per-second/ I am curious to develp the same Tool in python but fail all time anyone helps me to make other variations in python .I want to learn python RE: Accurate Clicks Per Second - metulburr - Dec-20-2020 split from https://python-forum.io/Thread-Accurate-Clicks-Per-Second as you are hijacking their thread somewhat If you can create it in javascript then you already know the procedure. Your problem then lies not in creating the program, but converting it over to python. As the opposite, i find it easier to implement anything in python than any other language. But that all depends on what language you are familiar with. The process of learning python requires converting known language script to python. So giving it to you does you no good. Give us your broken python script not working so we can find out where you went wrong. RE: [split] Accurate Clicks Per Second - LaimHunt - Sep-26-2021 Here is the full code of the Click per second test game you can follow this and make a good tool. Html <div id="container"> <div id="zone"></div> Clicks per second: <span id="counter">0</span> </div> CSS body { background: #aaa; } #container { font: normal 26px sans-serif; padding: 16px; background: linear-gradient(#58c, #bcf); box-shadow: 0 0 5px -1px, 0 0 5px #fff inset; text-shadow: 0 0 5px #fff; border-radius: 8px; } #zone { height: 160px; margin: 0 0 16px; background: #fff; box-shadow: 0 0 5px -1px inset, 0 0 5px #fff; border-radius: 8px; transition: box-shadow .5s; } #zone:hover { box-shadow: 0 0 5px -1px inset, 0 0 5px #fff, 0 0 5px 1px #007 inset; } #counter { font-weight: bold; transition: opacity .5s; } #counter::before { content: ''; font-weight: normal; } Js var started, resetTimeoutHandle, resetTimeout = 1000, container = document.getElementById('container'), counter = document.getElementById('counter'), zone = document.getElementById('zone'), clicks = 0; zone.onseclect = zone.onselectstart = function() { return false; }; function clicksPerSecond(started, clicks) { return clicks / ((new Date()) - started) * 1000; } function count() { clearTimeout(resetTimeoutHandle); clicks++; counter.innerText = clicksPerSecond(started, clicks); resetTimeoutHandle = setTimeout(reset, resetTimeout); return false; } function start() { started = new Date(); clicks = 0; counter.style.opacity = 1; this.onmousedown = count; this.onmousedown(); return false; } function reset() { zone.onmousedown = start; counter.style.opacity = 0.3; } reset(); Thankyou in advance. RE: [split] Accurate Clicks Per Second - LaimHunt - Oct-01-2021 Here is the full code of the Click per second test game you can follow this and make a good tool. I create a CPS test tool on this code you can use it. Html <div id="container"> <div id="zone"></div> Clicks per second: <span id="counter">0</span> </div> CSS body { background: #aaa; } #container { font: normal 26px sans-serif; padding: 16px; background: linear-gradient(#58c, #bcf); box-shadow: 0 0 5px -1px, 0 0 5px #fff inset; text-shadow: 0 0 5px #fff; border-radius: 8px; } #zone { height: 160px; margin: 0 0 16px; background: #fff; box-shadow: 0 0 5px -1px inset, 0 0 5px #fff; border-radius: 8px; transition: box-shadow .5s; } #zone:hover { box-shadow: 0 0 5px -1px inset, 0 0 5px #fff, 0 0 5px 1px #007 inset; } #counter { font-weight: bold; transition: opacity .5s; } #counter::before { content: ''; font-weight: normal; } Js var started, resetTimeoutHandle, resetTimeout = 1000, container = document.getElementById('container'), counter = document.getElementById('counter'), zone = document.getElementById('zone'), clicks = 0; zone.onseclect = zone.onselectstart = function() { return false; }; function clicksPerSecond(started, clicks) { return clicks / ((new Date()) - started) * 1000; } function count() { clearTimeout(resetTimeoutHandle); clicks++; counter.innerText = clicksPerSecond(started, clicks); resetTimeoutHandle = setTimeout(reset, resetTimeout); return false; } function start() { started = new Date(); clicks = 0; counter.style.opacity = 1; this.onmousedown = count; this.onmousedown(); return false; } function reset() { zone.onmousedown = start; counter.style.opacity = 0.3; } reset(); Thank you in advance. RE: [split] Accurate Clicks Per Second - chanvova - Jul-29-2022 I agree with @LaimHunt: Html <div id="container"> <div id="zone"></div> Clicks per second: <span id="counter">0</span> </div> CSS body { background: #aaa; } dordle #container { font: normal 26px sans-serif; padding: 16px; background: linear-gradient(#58c, #bcf); box-shadow: 0 0 5px -1px, 0 0 5px #fff inset; text-shadow: 0 0 5px #fff; border-radius: 8px; } #zone { height: 160px; margin: 0 0 16px; background: #fff; box-shadow: 0 0 5px -1px inset, 0 0 5px #fff; border-radius: 8px; transition: box-shadow .5s; } #zone:hover { box-shadow: 0 0 5px -1px inset, 0 0 5px #fff, 0 0 5px 1px #007 inset; } #counter { font-weight: bold; transition: opacity .5s; } #counter::before { content: ''; font-weight: normal; } Js var started, resetTimeoutHandle, resetTimeout = 1000, container = document.getElementById('container'), counter = document.getElementById('counter'), zone = document.getElementById('zone'), clicks = 0; zone.onseclect = zone.onselectstart = function() { return false; }; function clicksPerSecond(started, clicks) { return clicks / ((new Date()) - started) * 1000; } function count() { clearTimeout(resetTimeoutHandle); clicks++; counter.innerText = clicksPerSecond(started, clicks); resetTimeoutHandle = setTimeout(reset, resetTimeout); return false; } function start() { started = new Date(); clicks = 0; counter.style.opacity = 1; this.onmousedown = count; this.onmousedown(); return false; } function reset() { zone.onmousedown = start; counter.style.opacity = 0.3; } reset(); RE: [split] Accurate Clicks Per Second - zackwang - Sep-06-2022 I agree with you, thanks for your sharing. <Offsite link promotion link removed> RE: [split] Accurate Clicks Per Second - wordtime - May-18-2024 It's a great way to unwind and relax. Link Removed |