Log in

View Full Version : rs_GetUpText



wantonman
08-05-2011, 11:30 AM
I want to have a function that becomes true if specified text is found using the already function rs_GetUpText.

to rephrase i need help figuring out how to use rs_GetUpText...

function blah: boolean;
begin;
result: = found upper left text 'cow' // somewhere rs_GetUpText belongs
end;
///////////////////////////////


that is my example to elaborate to the fullest, I've been searching for hours...

Harry
08-05-2011, 11:47 AM
Result := GetUpText('Cow');

Troll
08-05-2011, 12:06 PM
Result := GetUpText('Cow');

If GetUpText = 'Cow' Then
blah

you want

Result := IsUpText('Cow')

Coh3n
08-05-2011, 03:16 PM
Should use waitUptextMulti(['Cow, ow'], 200);.

Flight
08-05-2011, 03:37 PM
Should use waitUptextMulti(['Cow, ow'], 200);.

I agree, this has always proved to me to be the more reliable option.

wantonman
08-05-2011, 10:50 PM
Im confused about this Example





FUNCTION
foundCow: boolean;
BEGIN;
Result := IsUpText('Cow')
END ;


PROCEDURE
Test;
BEGIN;
IF
Funtion = True // function being FoundCow
THEN
Writeln('You found the Cow')
END;

Harry
08-05-2011, 11:02 PM
No no no, you need to read up more on syntax and standards of this coding.

A function returns a value. The function name is what you give it, in this case findCow. If you want to see if findCow is True, then you simply do "if findCow then WriteLn('Found cow!');".