SRL Archive - OSR Help

How to find chatbox text.


Sax

2012-11-17 08:18:48

I have a repeat until loop where I want to repeatedly click until it finds a chatbox text.
I have used this IsChatBoxTextAnyLine like this:
until IsChatBoxTextAnyLine(', you may only use', 0); 

I think it didnt find because of the color. and I dont know what to put in color. the text is the normal black should I pick the color with the pickcolortool? What if it needs tolerance? There's no option for tolerance?

could anybody help me to find the text?

KingKong

2012-11-17 08:25:38

i think you should try it with the col from color picking tool. also chat box text is static, so no need for tolerance

riwu

2012-11-17 09:36:09

SRL constants:
clMessage = clBlack = 0 so you are doing it right.
Probably didn't find because the text doesn't match.
Try GetChatBoxText/ChatBoxTextArray to see what text it returns.

Sax

2012-11-17 13:10:11

well I want my script to stop when this message comes up:









and I have tried GetChatBoxText but it just successfully executes without returning the text.


I have this so far:


 MakeCompass(47);
SetAngle(1);
//ToggleXPPopUp(True);
MMouse(292, 71, 5, 5);
if IsUpText('-at Ta') then
repeat
ClickMouse2(true);
Wait(RandomRange(30, 50));
until IsChatBoxTextAnyLine('you may only use', 0);

but the script doesnt stop




Any Help???

Ian

2012-11-17 14:08:10

make a DTM of a unique part of the text then search the mainscreen for that DTM. something like

if find dtm then
terminatescript;

hope that helps, on phone atm

Olly

2012-11-17 14:33:08

That's not the chatbox, its npc :) try FindNPCChatText

Sax

2012-11-17 19:14:25

Yeah :D thats it. :duh:
I'll do it when I get to pc thanks :)

Edit: I have this now:
  repeat
ClickMouse2(true);
Wait(RandomRange(30, 50));
until FindNPCChatText('you may only', Nothing)

But the loop doesnt stop :(

any hint??