Gets the average pixel shift every 'waitPerLoop' ms over the time 'maxTime'
function AveragePixelShift(B: TBox(The area you want to search); waitPerloop (How long you want it to count the pixel shift), maxTime (Amount of time you want it to keep looping): Integer): Integer (It returns an integer of the average pixel shift for every (waitPerloop) over the max time given);
Say your Result from average pixel shift was 300 (while its doing something in the box) and you had entered 1000ms for the loop time.
You would know there have been 300 pixel movements in the 1000ms
v This is the time to wait to see how many pixels have moved 1000 ms = 1 second
if (PixelShift(TheBox, 1000) < 300) then
Result := True
Hope that helps :)