SCAR Code:
{.include SRL\SRL.scar}
const
Secs = 55; //Seconds until the mouse is moved.
SecUM = 50; //Seconds in which the Mouse is inactive?
var
b, c: Boolean;
x1, y1, x2, y2, MIT: Integer;
begin
SetupSRL;
MarkTime(MIT);
repeat
GetMousePos(x1, y1);
Wait(100);
GetMousePos(x2, y2);
if((x1=x2) and (y1=y2))then
if(TimeFromMark(MIT)>(SecUM*1000)) then
repeat
Wait((Secs*1000)+Random(Secs*500); //basic math, *1000/2 is the same as *500 :)
MouseBox(MSx1, MSy1, MSx2, MSy2, 2);
Wait(100+random(200));
MouseBox(MSx1, MSy1, MSx2, MSy2, 3);
MarkTime(MIT); // <- You need to remark the time, otherwise, your time will keep running and it defeats the purpose, so it will ALWAYS return true at that last if statement.
if(IsFKeyDown(2)) then
b:=True;
Until(b);
else
MarkTime(MIT);// <- If the mouse is being moved, it will remark the time.
Until(b);
end.