SRL Archive - Discussions and Debates

IsUpText?


HyperSecret

2007-11-07 14:47:00

is anyone else having troubles with IsUpText ? b/c in my woodcutter im making whenever it goes to the tree it wont detect the uptext at all i put
if isuptext('hop') then writeln('a');
it doesnt writeln but if i put
if not isuptext('hop') then writeln('a');
then it does writeln, even though the uptext is there…any suggestions?

but then again when i put
if isuptext('hop') then writeln('a');
click run and move the mouse to the tree, it will writeln.

its working fine earlier on while i was autoing but now when i try making a new function it wont detect it…

runescape screen is detected and such…

nielsie95

2007-11-07 14:48:32

What does

WriteLn(rs_GetUpText)

tells you?

HyperSecret

2007-11-07 14:55:24

when i run that and then move the mouse over the tree i get…

Chop down Tree / 2 more options

which is, im assuming, what i should get…cuz that is the uptext…but when i run isuptext in my function or procedure it doesnt detect

nielsie95

2007-11-07 14:59:39

Do you have a little wait between the mouse move and the textcheck?
Is your cts 1?

Also, how does the IsUpText in your SRL looks like?

HyperSecret

2007-11-07 15:04:55

hmm well i guess i never switch the CTS back to 1 at the end of the function…but when i had it in the function the CTS = 2 so it that is the reason i need to take it out of the function, yep i have a wait…and it
if (IsUpText('hop') then
begin
Mouse(TPA[i].]x, TPA[i].y, 2, 2, True);
x := TPA[i].X;
y := TPA[i].Y;
Result := True;
Exit;
end;

thats inside the function…outside the function is different but like i said i never set CTS back to 1 after i leave the function…or before i look for the uptext…

Narcle

2007-11-07 23:14:57

I was having problems with up text so I was using :
if (pos(istextup, rs_GetUpText) > 0) then

Sometimes IsUpText works sometimes it doesn't. But what I posted above always seems to work.

HyperSecret

2007-11-08 14:07:22

well i change colortolerancespeeds right before it looks for uptext and it works fine now :D

Pancakes

2007-11-08 16:09:29

Thats weird, I've never had a problem ???

Negaal

2007-11-09 11:50:12

Yep, i have some probs with uptext too, so cts needs to be 1 to work propely?:duh:

Wizzup?

2007-11-09 13:17:04

Yes, you have always needed CTS 1 for IsUpText to work properly.

n3ss3s

2007-11-09 13:19:48

Thanks for the tip wizzup, thats why my axe head pickuper didn't first work :p

Wizzup?

2007-11-09 13:52:57

From: n3ss3s
Thanks for the tip wizzup, thats why my axe head pickuper didn't first work :p


I had to find out the hard way, too.
Long time ago.
I found out that whenever I shut SCAR and run the UpText check again, it worked… ;)

EDIT:
From FindObjTPA:

  tcts := GetColorToleranceSpeed;
//////
for I := 0 to Length(aPoints) - 1 do
begin
if Length(aPoints[I]) < minCount then
Continue;
myPoint := MiddleTPA(aPoints[I]);
MMouse(myPoint.X, myPoint.Y, 0, 0);
Wait(100 + Random(50));
ColorToleranceSpeed(tcts);
if IsUpText(UpText) then

Darn, the bug is in there too.. lol