SRL Archive - Help and Support

WaitUpText


Heavenzeyez1

2012-02-13 02:51:58

Hey,
So I can't find out what's causing this…
I have bank open and mouse over the rune ess, but it doesn't find the uptext.
See the picture and code above.
if WaitUpText('ssen', 10000) then
begin
Writeln('We still have essence in our bank - withdrawing.');
GetMousePos(x, y);
Mouse(x, y, 0, 0, 0);
Wait(RandomRange(100, 200));
end
else
begin
Result := False;
PlayerFalse('NoEssence', 'NoEssence', False);
Exit;
end;
Here is a picture of it failing(the uptext is clearly visible).
The problem is that it only happens once in a while, not always…
What could be causing this?
Thanks in advance,
~Eerik.

euphemism

2012-02-13 03:27:27

You might try using WaitUpTextMulti with something like:


if WaitUpTextMulti(['essence', 'ssen', 'es', 'enc', 'ce', 'se'], 1000) then

bg5

2012-02-13 03:27:59

This happens to me sometimes too ,the reason is background of uptext i think.

And some clusters of letters are harder to detect then others so ,like Euphemism said WaitUpTextMulti is better option.

Heavenzeyez1

2012-02-13 08:16:30

Thank you, it works now with Multi! ;)

~Eerik.