kk so I am having a problem on a mac where the audio doesnt work very well unless my finger is on the touchpad... it works perfectly smooth...
I want to write code to detect whether the finger is there or not and if it isnt then move the mouse x pixels and repeat until i actually touch the pad...
I found this in java that seems extremely relevant but Im not sure how to write this in c++ or if there is a better way to do it... currently im trying to do it in windows as I dont know yet how to program c++ on a mac or get it to run on a mac... I also heard objective c is for mac but Im sure c++ can work on it too... :S not sure where to start or how to do this in c++
document.onmousemove = (function() {
var onmousestop = function() {
/* do stuff */
}, thread;
return function() {
clearTimeout(thread);
thread = setTimeout(onmousestop, 500);
};
})();
Code explanation:
Detects if the mouse is moving and does nothing if it is... but if the mouse has stopped for more than half a second, it executes the code and repeats until the mouse is moved.