SRL Archive - OSR Help

UpText issue


Kevin

2013-01-30 22:47:07

Currently I'm running into an issue with WaitUpText(String, integer) and WaitUpTextMulti(TStringArray, integer).

When highlighting a "Guard", the following command:
WaitUpTextMulti(['Guard', 'ard'], 400);
seems to only work with about a 90% success rate. And on very rare occasions, a "Paladin" will be highlighted and that same previous command will return true with about a 10% chance.

WaitUpTextMulti(['Pompous ', ' Merchant', 'omp', 'erch'], 400);
and
WaitUpTextMulti(['Al ', ' Kharid ', ' Warrior', 'rid war'], 400);
and
WaitUpTextMulti(['Knight ', ' Ardougne', 'night of ', 'dougn'], 400);
all appear to be perfectly fine when highlighting their respective targets and returning true only when true, and doing so much closer to 100% of the time.

Advice?

x[Warrior]x3500

2013-01-31 00:02:41

the only time i have ever gotten an issue with uptext is when the background was a similar color or was somehow disrupting the uptext. could this possibly be the case?

Olly

2013-01-31 00:21:07

I believe @BraK may have some OCR updates in the future that could help fix this :)

Kevin

2013-01-31 00:50:03

From: x[Warrior]x3500
the only time i have ever gotten an issue with uptext is when the background was a similar color or was somehow disrupting the uptext. could this possibly be the case?


I don't think that's the issue at least in this case, I was wondering more-so if it was simply a bug of some kind, or just some odd setting I didn't consider/know of.

From: Ollybest
I believe @BraK may have some OCR updates in the future that could help fix this :)


I most definitely look forward to those updates then! Is there an ETA on those by chance, or will that come when it's ready? (accuracy over rushed release definitely preferred).

Ashaman88

2013-01-31 00:57:16

You can see what the uptext is detecting by doing something like writeln(getuptext) - not sure if that is the right function. But just call that to see what it is actually detecting and change your input accordingly

DannyRS

2013-01-31 02:46:13

From: Ashaman88
You can see what the uptext is detecting by doing something like writeln(getuptext) - not sure if that is the right function. But just call that to see what it is actually detecting and change your input accordingly


I just made a version of this for a private server and was looking all about in OCR, I think the SRL Include is named GetUpText, but that simply calls "rs_GetUpText", which I can't seem to find the code for :p maybe thats hidden somewhere in OCR?

Either one should print out the uptext for you, try and avoid capital letters, and use as few letters as you can that will never be found together in other UpText's

Le Jingle

2013-01-31 02:54:57

iirc rs_GetUpText uses GetUpTextAtEx, found here.

Kevin

2013-01-31 10:56:29

Thank you to each of you! I'll look into that tonight to see what is seems to return!

DannyRS

2013-01-31 11:17:24

From: Le Jingle
iirc rs_GetUpText uses GetUpTextAtEx, found here.


Interesting ;) why can't this be viewed in simba by double clicking the function? I must be noobing this, I think used something close to the way the SRL dev's would have done anyway :p,


From: nivek1989
Thank you to each of you! I'll look into that tonight to see what is seems to return!


Take a look at IsUpTextMultiCustom, its the best and most reliable way imo ;)

Le Jingle

2013-01-31 12:27:05

From: DannyRS
Interesting ;) why can't this be viewed in simba by double clicking the function? I must be noobing this, I think used something close to the way the SRL dev's would have done anyway :p,


I think you can't see this in the function list, because it's a built in function (the link I relayed was to the simba function) whereas data members you can see code for in simba is more-so the SRL-include (from the SRL/SRL5 github). Kind of confusing, I was never told this, but this is what I have come to take as knowledge myself (finding the line between the simba and SRL code, as well as the vast difference between pascal script (for writing rs scripts) and real world code that has many more options (pascal)).

Cheers,
Lj :)

rj

2013-01-31 15:52:09

Here is the code DannyRS gave to me to test uptext:

Program testP06;

{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}

Begin
SetupSRL;
ActivateClient;
Wait(2000);
WriteLn(GetUpText);
End.