PDA

View Full Version : Click Count?



Penguin
07-14-2014, 02:21 PM
For a failsafe, I'm trying to find a way so that it will read how many clicks it has performed before giving up on the inventory and continuing to the banking. I've been looking around the functionlist for a while now and have just brainfarted, here's my idea:
var
ClickCount:Integer;

Begin
ClickCount := 0; <-- Resets the clickcount to 0 for every loop
repeat
TypeSend('1', False);
Wait(randomRange(50, 150));
fastclick(MOUSE_LEFT);
Wait(randomRange(1500, 350));
until
(isMouseOverText(['une bar']));
or
ClickCount >= 6; <-- Limits the amount of clicks since the beginning of the procedure
End;

TLDR, Can I count Clicks?
Any help/advice would be amazing :)

sdf
07-14-2014, 02:23 PM
You are looking for
inc(ClickCount)

i.e.
var
ClickCount: Integer;
begin
ClickCount := 0;
repeat
TypeSend('1', False);
Wait(randomRange(50, 150));
fastclick(MOUSE_LEFT);
inc(ClickCount);
Wait(randomRange(1500, 350));
until (isMouseOverText(['une bar']));
or ClickCount >= 6;
end;

Penguin
07-14-2014, 02:28 PM
You are looking for
inc(ClickCount)

i.e.
var
ClickCount: Integer;
begin
ClickCount := 0;
repeat
TypeSend('1', False);
Wait(randomRange(50, 150));
fastclick(MOUSE_LEFT);
inc(ClickCount);
Wait(randomRange(1500, 350));
until (isMouseOverText(['une bar']));
or ClickCount >= 6;
end;

Facepalm, Thank you :)

Turpinator
07-14-2014, 02:41 PM
var
ClickCount: Integer;
begin
ClickCount := 0;
repeat
TypeSend('1', False);
Wait(randomRange(50, 150));
fastclick(MOUSE_LEFT);
//inc(ClickCount); /// or below.
ClickCount := ClickCount + 1;
Wait(randomRange(1500, 350));
until isMouseOverText(['une bar']) or (ClickCount >= 6);
end;
changed the end to that until statement to correct syntax/standards. did it work like that before?

Penguin
07-14-2014, 02:44 PM
var
ClickCount: Integer;
begin
ClickCount := 0;
repeat
TypeSend('1', False);
Wait(randomRange(50, 150));
fastclick(MOUSE_LEFT);
//inc(ClickCount); /// or below.
ClickCount := ClickCount + 1;
Wait(randomRange(1500, 350));
until isMouseOverText(['une bar']) or (ClickCount >= 6);
end;
changed the end to that until statement to correct syntax/standards. did it work like that before?

It actually did, but thanks for going back and double checking

The Mayor
07-14-2014, 08:08 PM
You could also use:



procedure something();
var
clickCount: integer;
begin
while clickCount < 7 do
begin
typeSend('1', False);
wait(randomRange(50, 150));
fastclick(MOUSE_LEFT);
wait(randomRange(1500, 350));
if isMouseOverText(['une bar'])) then
break;
end;
end;