SRL Archive - Senior Scripts and Snippets

Better IsUpText?


pwnaz0r

2007-09-17 18:42:46

Well, I know that IsUpText isnt great because of all the color being so similar around it. It just seems that the way the colors and composed around it, it seems difficult to find. I made a quick function, and the reason i posted it here is that i didn't want to look stupid if SCAR's rs_GetUpText is not as good as SRL's. This is kinda just a basic function and I'm sure it could be made better, just gives you an idea.


function IsUpText(s: string): boolean;
begin
result:= Pos(s, rs_getuptext) <> 0;
end;

Smartzkid

2007-09-17 20:26:40

Makes sense.

function IsUpText(s: string): boolean;
begin
result:= Pos(s, rs_getuptext) <> 0;
end;

nielsie95

2007-09-18 01:55:56

Already there in the next SRL ;)
Freddy made a new rs_GetUpText and it works great :)

pwnaz0r

2007-09-18 21:11:48

Yeah i heard that

Special Ed

2007-09-18 21:21:17

How can you make it better, besides making it faster and more accurate. I'm talking code-wise, but I've never really looked into "IsUpText" That much so I wouldn't know how it works.
Are you having problems with it or are you just wondering if there is something better?

pwnaz0r

2007-09-18 23:04:00

It uses findText and is in SRL. THe rs_GetUpText can distinguish between text and colors in the back ground better.