Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Hit up this link for the full explanation of one approach that seems to be what you're looking for.</p> <p><a href="http://www.faqts.com/knowledge_base/view.phtml/aid/14742/fid/53" rel="nofollow noreferrer">http://www.faqts.com/knowledge_base/view.phtml/aid/14742/fid/53</a></p> <p>Here's an excerpt:</p> <blockquote> <p>This handler then sets up event capture for mouse movement and stores mouse cursor positions in variables mouseX and mouseY. It then starts the timer monitorMouse() which measures mouse cursor speed by sampling the values in these variables at regular intervals. The variables mouseLeft and mouseTop hold each samplings mouse positions and the sampling rate is set to 100 milliseconds in the variable monitor.timerDelay.</p> </blockquote> <p>And some of the author's code:</p> <pre><code>nn4 = (document.layers)? true:false; mouseLeft = mouseTop = mouseX = mouseY = 0; monitor = { timerDelay:100, moveLimit:2, sampleLimit:10 }; function startMonitor(thisText) { if (!tip) return; toolTipText = thisText; writeTooltip(toolTipText); document.captureEvents(Event.MOUSEMOVE); document.onmousemove = function (evt) { mouseX = evt.pageX; mouseY = evt.pageY; return true; } monitorMouse(); } function stopMonitor() { if (!tip) return; hideTooltip(); if (monitor.timer) { clearTimeout(monitor.timer); monitor.timer = null; } document.releaseEvents(Event.MOUSEMOVE); document.onmousemove = null; monitor.slowSamples = 0; } function monitorMouse() { if (Math.abs(mouseX - mouseLeft) &gt; monitor.moveLimit || Math.abs(mouseY - mouseTop) &gt; monitor.moveLimit) { monitor.slowSamples = 0; } else if (++monitor.slowSamples &gt; monitor.sampleLimit) { showTooltip(); return; } mouseLeft = mouseX; mouseTop = mouseY; monitor.timer = setTimeout("monitorMouse()",monitor.timerDelay); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload