SRL Archive - General Botting Help

How to make something repeat if dtm isnt found


Hexless V2

2014-04-17 14:37:49

Hey just a quick question on how to make something repeat if it doesn't find a DTM and if the DTM is found then wouldn't repeat it? any help would be great thanks!

Thanks for the help everyone! :D

Frement

2014-04-17 15:28:18

Lets assume you have your FindDTM call in a function or a procedure.

procedure MyFindProc;
begin
if (not FindDTM(..)) then
begin
MyFindProc;
Exit;
end;
//Here process the information from FindDTM
end;

Brotein

2014-04-17 15:29:55

repeat
doSomething;
until(findDTM(MyDTM, X, Y, mainScreen.getBounds());

YoHoJo

2014-04-17 17:17:07

From: Brotein
repeat
doSomething;
until(findDTM(MyDTM, X, Y, mainScreen.getBounds());


This would need a failsafe though, either a break inside the loop, or and OR after the finddtm line, like a max timeer or something, in case the dtm is never found.

Hoodz

2014-04-17 18:05:02

From: YoHoJo
This would need a failsafe though, either a break inside the loop, or and OR after the finddtm line, like a max timeer or something, in case the dtm is never found.


you still got it ;)

YoHoJo

2014-04-17 20:18:22

From: hoodz
you still got it ;)


I know roite? hahaha
I surprised myself as I typed those words.
I was like "whoa! I still know things?"

Frement

2014-04-17 20:26:36

From: YoHoJo
I know roite? hahaha
I surprised myself as I typed those words.
I was like "whoa! I still know things?"


You missed the endless loop in my code example :)