yea can someone explain this function like where to put the x,y and everything else it doesnt work to good for me.
yea can someone explain this function like where to put the x,y and everything else it doesnt work to good for me.
this is how i used it
GetTextAtEx(18, 415, 7, SmallChars, False, False, 0, 0, 0, 50, False, tr_allChars));
SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
Programming Projects: NotePad | Tetris | Chess
well can you explain it
Open SCAR press F1, and find for Text finding funcions.
There is explained almost all SCAR functions.
That was taken from the SCAR manual. That should answer most of your questions.function GetTextAtEx(x, y: Integer; Tolerance: Integer; Chars: Integer; CheckShadow, CheckOutline: Boolean; MinSpacing, MaxSpacing: Integer; TextColor: Integer; TextLength: Integer; Strict: Boolean; Range: TCharRange): string;
Reads text at position specified by x, y. Tolerance specifies acceptable color range in for characters that 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, TextLength - maximal text length to read, if Strict is set to true then it won't find characters that contain additional pixels of character's color in the same area as character is, Range can have following values:
tr_AllChars - read all characters;
tr_BigLetters - read capital Latin letters;
tr_SmallLetters - read lowercase Latin letters;
tr_Digits - read digits;
tr_BigSymbols - read symbols that are big in size, like "=", "%", "$", etc;
tr_SmallSymbols - read small symbols like ".", ",", "'", etc;
tr_SecondTableChars - read symbols with character code above 127;
tr_Letters = tr_BigLetters or tr_SmallLetters;
tr_AlphaNumericChars = tr_Letters or tr_Digits;
tr_Symbols = tr_BigSymbols or tr_SmallSymbols;
tr_NormalChars = tr_AlphaNumericChars or tr_Symbols;
Example:
GetTextAtEx(9, 9, 130, UpChars, True, False, 0, 1, $E0E0E0, 20, False, tr_AlphaNumericChars) - read RS2 upper text in this color.
GetTextAtEx(96, 387, 0, ChatChars, False, False, 0, 0, -1, 20, True, tr_NormalChars) - read RS2 chat text in any color.
UpChars and ChatChars are set up during script initialization like this:
UpChars := LoadChars2(AppPath + 'CharsRS22\');
ChatChars := LoadChars2(AppPath + 'CharsChat2\');
yea it says reads text at x,y but where is x y i already read that but where do i put x,y where in the word
dependa what ur doing...where are u getting ur words from
SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
Programming Projects: NotePad | Tetris | Chess
ok what part of the word like the top left corner just tell me where on the word do i put it.
is it on the top left corner of the word?
its for finding run % and i checked there and there was none.
This should work:
SCAR Code:function RunLeft: Integer;
var
x, y: integer;
begin
if IsTextInAreaEx(628, 430, 665, 451, x, y, '%', 50, SmallChars, False, False, 0, 2, 39167) then
Result := StrToInt(Trim(GetTextAtEx(x -22, y, 50, SmallChars, False, False, 0, 4, 39167, 5, False, tr_Digits)));
end;
ty so much
There are currently 1 users browsing this thread. (0 members and 1 guests)