program allpixels;
var
x,y,x1,y1: Integer;
begin
SetDesktopAsClient;
GetClientDimensions(x1,y1);
writeln('X1 = '+inttostr(x1)+'');
writeln('Y1 = '+inttostr(y1)+'');
x := 0;
y := 0;
repeat
if(x < x1) then
begin
movemouse(x,y) // change this with Clickmouse(x,y,true); for clicking, pretty hard to test lol.
wait(10);
x := x + 1;
if(x = x1) then
begin
y := y + 1;
x := 0
end;
if(y = y1) then
begin
Terminatescript;
end;
end;
until(false)
end.