Basically I want to be able to hold a key down and when said task is done, it initiates a loop to repeatedly left click the mouse. I don't know anything about pascal and getting really confused with functions. This is what I attempted from various links I searched.
It could be completely wrong and I'm not surprised. Any help is appreciated.
Code:
program CleaningHerbs;
var
Bingo: Integer;
begin
while IsKeyDown(VK_SHIFT) do
begin
ClickMouse(true);
wait(random(100) + 50);
Bingo = random(10);
if Bingo < 2 then
begin
wait(random(30);
end;
end;
end.
It could be completely wrong and I'm not surprised. Any help is appreciated.

