What game is it you are trying to play, and how do you mean it doesn't work? The mouse isn't moving or?
I added a couple of other little bits and pieces to it with comments to show you what it's doing and why I put it there. Tested it out and it moved the mouse around and clicked on random stuff (on my notepad, given I don't know what game it's for I used a full-screen notepad as the client).
program EcFarm;
var
Loads: Integer;
begin
ActivateClient; // Makes defined client active window
repeat
Loads := 0; // It will keep increasing loads but never reset it without this
repeat
Status('Loads: ' + IntToStr(Loads)); // Writes what loads equals in the status bar
MoveMouse(640, 527);
ClickMouse(640, 527, 1);
Wait(4000);
Inc(Loads); // Same as Loads := Loads + 1; but neater
until (Loads >= 150);
MoveMouse(780, 227);
ClickMouse(780, 227, 1);
Wait(1500);
MoveMouse(783, 307);
ClickMouse(783, 307, 1);
Wait(1850);
MoveMouse(780, 389);
ClickMouse(780, 389, 1);
Wait(1495);
until (false);
end.