Footy
2012-08-25 09:49:12
Hey guys, how would I get a for..to..do loop to go through random points in a TPA?
2012-08-25 09:49:12
2012-08-25 09:55:53
2012-08-25 09:56:35
2012-08-25 10:00:03
if(GetArrayLength(TPA) <> 0)then
begin
Repeat
R := Random(GetArrayLength(TPA));
MMouse(TPA[R].x, TPA[R].y, 3, 3);
if(WaitUpText('the objct you are looking for', 50+Random(200)))then
begin
ClickMouse2(mouse_Left);
Result := DidRedClick;
break;
end;
inc(Counter);
Until(Counter > 5);
end;
2012-08-25 10:01:53
2012-08-25 10:02:47
From: Footy
Say I made a TPA that collected Tpoints of all color A in a box. What I want this to do is go through random points in the TPA instead of in any order.
2012-08-25 20:13:48
From: putonajonny
if(GetArrayLength(TPA) <> 0)then
begin
Repeat
R := Random(GetArrayLength(TPA));
MMouse(TPA[R].x, TPA[R].y, 3, 3);
if(WaitUpText('the objct you are looking for', 50+Random(200)))then
begin
ClickMouse2(mouse_Left);
Result := DidRedClick;
break;
end;
inc(Counter);
Until(Counter > 5);
end;