SRL Archive - OSR Help

Searching a string within a string?


JaminB

2011-11-11 10:22:12

Hey guys I am writing an autominer and am using the OCR function GetUpText to confirm that I am actually clicking on a rock and not a pixel of the same color. The problem is that sometimes GetUpText reads the wrong input in the upper corner by adding a '( or some random character.

I want to search for a particular string within the GetUpText return string.

How do I do this?

Nava2

2011-11-11 10:25:00

In general, you use the function Pos() to search a substr in a str.

For the case of up text, use IsUpText, in SRL.

JaminB

2011-11-11 10:31:57

Works like a charm! Thanks for the prompt response!

Nava2

2011-11-11 10:40:34

Not a problem!