I want to make a simple loop that looks for either "Fail" in the chatbox or for "open" in the chatbox. Both will appear on line 8.
The following code does not work, it only works if the chatbox has "fail" on rule 8 and it is stuck if it actually opens something and gets "open" in the chatbox.
How can I fix this?
Simba Code:
begin;
while not (FindChatBoxText('fail', 8, clBlack)) or (FindChatBoxText('open', 8, clBlack)) do
Wait(50);
end;
EDIT: I've found a way to avoid this now
Simba Code:
begin;
repeat
Wait(100+random(100));
until FindChatBoxText('fail', 8, clBlack) or FindChatBoxText('open', 8, clBlack);
end;
This works. If anyone has any tips though, let me know.