SRL Archive - OSR Help

wait?


ogustuce

2012-03-17 22:07:05

Hello again, how can i write this in codes?


ClickBank;
wait until bankscreen;

Velvet Glam

2012-03-17 22:12:23

I codes it like this: :p

t := GetSystemTime;
while ( not BankScreen ) do
begin
if GetSystemTime - t > 35000 then
begin
Writeln('Unable to click the bank!');
//Logout;
Exit;
end;

ClickBank;

t2 := GetSystemTime;
while GetSystemTime - t2 < 6500 do
if BankScreen then
Break
else
Wait(50 + Random(100));
end;

you can remove the inner while loop, if that is already done in your "ClickBank" function

bg5

2012-03-17 22:12:38


ClickBank;
repeat
wait(10);
until bankscreen

but if bankscreen doesn't apear ,it will wait in infinite ,so it's wrong. So you should add max waiting time:



var
t ,maxtime: integer;
begin
maxtime := 6000;
ClickBank;
t := GetTimeRunning;
repeat
wait(10);
until (bankscreen)or( (GetTimeRunning-t) > maxtime)

end;

Or you can make it all in one line:


ClickBank;
Waitfunc( @bankscreen ,10 ,6000 );

ogustuce

2012-03-17 22:28:46

kk thanks