SRL Archive - Help

rs_GetUpText


wantonman

2011-08-05 07:30:36

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

2011-08-05 07:47:19

Result := GetUpText('Cow');

Troll

2011-08-05 08:06:05

From: Harry
Result := GetUpText('Cow');


If GetUpText = 'Cow' Then
blah

you want

Result := IsUpText('Cow')

Coh3n

2011-08-05 11:16:42

Should use waitUptextMulti(['Cow, ow'], 200);.

Flight

2011-08-05 11:37:02

From: Coh3n
Should use waitUptextMulti(['Cow, ow'], 200);.


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

wantonman

2011-08-05 18:50:40

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

2011-08-05 19:02:41

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!');".