[question] Pascal/scar Divi

09/29/2015 09:21 SeafightSellShip's#1


I'd like to know how to but a RandomWait into my script. I'd like to run a script which clicks non stop on some buttons and once in every 5-10 on a certain button, anyone knows how to do this?
09/29/2015 19:34 warfley#2
Using [Only registered and activated users can see links. Click Here To Register...] function you can generate a number between 5 and 10, give it to in int variable, then you could do a while loop to press your buttons, counting your variable down, when it reaches 0 you press that special button, and generate a new number
something like this:
Code:
procedure Clickbuttons;
var
  c: Integer;
begin
  c := RandomRange(5, 10);
  While True do
  begin
    // Press your Buttons here
    dec(c);
    if c = 0 then
    begin
      //Press the special button here
      c := RandomRange(5, 10);
    end;
  end;
end;