I'm writing a script for another game and I want Scar to locate text and click on it.
I'm trying to use:
Code:
function IsTextAtEx(x, y: Integer; S: string; Tolerance: Integer; Chars: Integer; CheckShadow, CheckOutline: Boolean; MinSpacing,
MaxSpacing: Integer; TextColor: Integer): Boolean;
Checks if text specified by S is at location specified by x, y. Tolerance specifies acceptable color range in case characters are not completely
monochrome, Chars specifies font number returned by LoadChars2 or LoadCharsFromFont2, CheckShadow specifies whether function
should look for shadow, CheckOutline specifies whether function should verify if character borders are correct, MinSpacing and MaxSpacing
are RS1 and RS2 specific parameters for text with changing spacing between characters, in other cases use MinSpacing=0 and
MaxSpacing=0, TextColor specifies text color, if set to -1, will search for text in any color.
(found on the Scar help page)
But I don't quite understand one of the terms.
What is the so called ''font number returned by LoadCharsFromFont2''
This is the font I'm *trying* to use.
SCAR Code:
LoadCharsFromFont2('Arial', 10, False, False, True, False);
I'm planning on using:
SCAR Code:
if(IsTextAtEx(x, y: Integer; S: string; Tolerance: Integer; Chars: Integer; CheckShadow, CheckOutline: Boolean; MinSpacing,
MaxSpacing: Integer; TextColor: Integer))then
//rest of procedure
Will that work (I'm pretty sure there needs to b an '=true' in there somewhere), and if not how can I make Scar determine where a string of text is then click on it.
This is proving very difficult for me, but I figured here was the best place to ask for help.
Thanks in advance, and if you don't understand what I'm asking then pls ask me to clarify.
Regards
~Gumby