SRL Archive - Help and Support

I need efficiency! :)


Liquid

2006-03-18 15:13:40

Now, what would be the best way to rotate through 26 characters 8 times in different but the same locations?

For example… X represents a random letter.

X X X X X X X X

Now I would need to solve the first letter then the second and so forth. I need a fast way any suggestions? I already created the masks and everyhting and they all work.

PS: Not for runescape. Another old text game my friend wants me to auto.

masquerader

2006-03-18 16:27:13

er… name them according to ascii values, loadchars2, and then use gettext
if you dont want to do that, look at library.text and write your own text functions from that
i could help you i suppose

masquerader —the charsnpc guy

Liquid

2006-03-18 21:45:44

From: masquerader
er… name them according to ascii values, loadchars2, and then use gettext
if you dont want to do that, look at library.text and write your own text functions from that
i could help you i suppose

masquerader —the charsnpc guy


Well I looked at how you created your NPC char font and how you named it in the file and I did the same. So then what? How would I create a function that gets the text from within a certian area. Since the letters in my case appear in like a 25pixel random.?

masquerader

2006-03-18 22:38:13

load the font, then write a couple for loops with gettextatex's
you will probably have to adjust the parameters and such

i just thought of something: if its a text game, you might be able to find out which font its in and do LoadCharsFromFont2, but it might be hard to find out the size and such

Flyboy

2006-03-19 01:55:36

If you are planning to use GetTextAtEx, I made this little utility to test every possible setting. This uses all the normal fonts for RS2 but you can substitute your own font. Just let it rip and then scan the results for the best settings for your needs.



{
GetTextAtEx - Exhaustive Tester by Flyboy

This is a tool to be used by scripters who are wanting to use the function
GetTextAtEx. Instead of having to manually experiment with multiple setting to
find the perfect match, just use this script and it will test all possible
settings allowing you to make an informed decision as to what settings should be
used in your script.

This script was writen and published with the express intent to further the
cheating community. If you find this useful, site me in your script equal to
your level of appreaciation. Please feel free to copy, tweak and use this
script and any concepts you glean from it in any way you find useful but please
give me credit where it is due.

Cheers,
-Flyboy

Here's your step-by-step guide:
1. Take a screen-shot of what you want to test and open in ms-paint
2. open this script in SCAR ver 2.03 or later
3. drag crosshairs over picture in paint
4. adjust the settings in 'Procedure UserSetup;' section
5. click run
6. go make coffee while it runs the test (you'll need it when look through data)
6. scroll through the results and find what settings gave you the best results
7. post your findings in the forum where you downloaded this script, GetTextEx
is one of the least used functions, so your findings will be appreciated by
all scripters.
}
program GetTextAtEx_ExhaustiveTesterbyFlyboy;

var
TradeText1Color: integer;
TolLoop, MinSpacing, MaxSpacing, Loop, IncTol, Tolerance, Length: integer;
UpChars,CharsChat,Fontsmall,Font2 : integer;
Range : integer;
strRange : string;
tx1, ty1, tx2, ty2 : integer;
{======================================================================+
Setup Variables below
+======================================================================}
Procedure UserSetup;
Begin
tx1 := 309; //set x, y values for the upper left corner of search box
ty1 := 238;
tx2 := 457; //set x, y values for the bottom right corner of search box
ty2 := 250;

TradeText1Color := 65535; //color of text you are searching for.
//-1 for any color
Tolerance := 0; //initial tolerance level for first loop
Loop := 1; //(1-20) Number of times you want to loop with greater tolerance
// each loop
IncTol := 0; //amount to incrase tolerance each loop
Length := 1; //Number of characters at a time to look for
MinSpacing := 0; //Minimum Spacing between characters
MaxSpacing := 5; //Maximum spacing between characters
Range := 0; //Currently set to try all 11 posibilities... see below for chart
// 0 = **Will loop once through all the range
// 1 = tr_AllChars - read all characters;
// 2 = tr_BigLetters - read capital Latin letters;
// 3 = tr_SmallLetters - read lowercase Latin letters;
// 4 = tr_Digits - read digits;
// 5 = tr_BigSymbols - read symbols that are big in size, like "=", "%", "$", etc;
// 6 = tr_SmallSymbols - read small symbols like ".", ",", "'", etc;
// 7 = tr_SecondTableChars - read symbols with character code above 127;
// 8 = tr_Letters = tr_BigLetters or tr_SmallLetters;
// 9 = tr_AlphaNumericChars = tr_Letters or tr_Digits;
//10 = tr_Symbols = tr_BigSymbols or tr_SmallSymbols;
//11 = tr_NormalChars = tr_AlphaNumericChars or tr_Symbols;
End;
{************* Do not Touch below this point **************************}


{======================================================================+
Standard Setup Junk below: ie: set varables, load dtms, bitmaps etc.
+======================================================================}
Procedure Setup;
Begin
UpChars:= LoadChars2(AppPath + 'Charsrs22\');
CharsChat:= LoadChars2(AppPath + 'CharsChat2\');
Fontsmall:=LoadChars2(AppPath + 'CharsChat2\fontsmall\');
Font2:=LoadChars2(AppPath + 'CharsChat2\font2\');
LoadChars('');
end;

{======================================================================+
Look on trade window
+======================================================================}
procedure GetText(CheckShadow, CheckOutline, Strict:boolean; Tol:integer);
var
strCheckShadow,strCheckOutline,strStrict,
tmpUpChars, tmpCharsChat, tmpFontsmall, tmpFont2: string;
i, j, StartTime : integer;
begin
if CheckShadow then
strCheckShadow := 'true'
else
strCheckShadow := 'false'
if CheckOutline then
strCheckOutline := 'true'
else
strCheckOutline := 'false'
if Strict then
strStrict := 'true'
else
strStrict := 'false'

StartTime := GetSystemTime;

writeln('');
writeln('Settings: Tolerance = '+inttostr(Tol)+' CheckShadow: '+strCheckShadow+' CheckOutline: <'+strCheckOutline+'>'+' Strict: <'+strStrict+'> Range Type #'+inttostr(Range));
strRange := 'tr_AllChars';
for i := tx1 to tx2 do begin
for j := ty1 to ty2 do begin
{
if (Range = 0) then begin //if Range is 0 then loop once through all the range(1-12)
for Range := 1 to 11 do begin //otherwise it will just execute the selected range
case Range of
1: begin // 'tr_AllChars';//read all characters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
MoveMouse(i, j);
end;
2: begin // 'tr_BigLetters';// - read capital Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
MoveMouse(i, j);
end;
3: begin // 'tr_SmallLetters';// - read lowercase Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
MoveMouse(i, j);
end;
4: begin // 'tr_Digits';// read digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
MoveMouse(i, j);
end;
5: begin //'tr_BigSymbols';// - read symbols that are big in size, like "=", "%", "$", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow,
CheckOutline, MinSpacing, MaxSpacing,
TradeText1Color, Length,
Strict, tr_BigSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
MoveMouse(i, j);
end;
6: begin // 'tr_SmallSymbols';// - read small symbols like ".", ",", "'", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
MoveMouse(i, j);
end;
7: begin // 'tr_SecondTableChars';// - read symbols with character code above 127;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
MoveMouse(i, j);
end;
8: begin //'tr_Letters';// = tr_BigLetters or tr_SmallLetters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
MoveMouse(i, j);
end;
9: begin // 'tr_AlphaNumericChars';// = tr_Letters or tr_Digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
MoveMouse(i, j);
end;
10: begin // 'tr_Symbols';// = tr_BigSymbols or tr_SmallSymbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
MoveMouse(i, j);
end;
11: begin //'tr_NormalChars';// = tr_AlphaNumericChars or tr_Symbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
MoveMouse(i, j);
end;
end; //case Range...
end; //for Range..
end else begin
}
case Range of
1: begin // 'tr_AllChars';//read all characters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
MoveMouse(i, j);
end;
2: begin // 'tr_BigLetters';// - read capital Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
MoveMouse(i, j);
end;
3: begin // 'tr_SmallLetters';// - read lowercase Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
MoveMouse(i, j);
end;
4: begin // 'tr_Digits';// read digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
MoveMouse(i, j);
end;
5: begin //'tr_BigSymbols';// - read symbols that are big in size, like "=", "%", "$", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow,
CheckOutline, MinSpacing, MaxSpacing,
TradeText1Color, Length,
Strict, tr_BigSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
MoveMouse(i, j);
end;
6: begin // 'tr_SmallSymbols';// - read small symbols like ".", ",", "'", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
MoveMouse(i, j);
end;
7: begin // 'tr_SecondTableChars';// - read symbols with character code above 127;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
MoveMouse(i, j);
end;
8: begin //'tr_Letters';// = tr_BigLetters or tr_SmallLetters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
MoveMouse(i, j);
end;
9: begin // 'tr_AlphaNumericChars';// = tr_Letters or tr_Digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
MoveMouse(i, j);
end;
10: begin // 'tr_Symbols';// = tr_BigSymbols or tr_SmallSymbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
MoveMouse(i, j);
end;
11: begin //'tr_NormalChars';// = tr_AlphaNumericChars or tr_Symbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
MoveMouse(i, j);
end;
end; //case Range...

{ end;
}
if not (trim(tmpUpChars) = '') or not (trim(tmpCharsChat) = '') or not (trim(tmpFontsmall) = '') or not (trim(tmpFont2) = '') then
writeln('x: '+inttostr(i)+' y: '+inttostr(j)+' tmpUpChars: <'+tmpUpChars+'>'+' tmpCharsChat: <'+tmpCharsChat+'>'+' tmpFontsmall: <'+tmpFontsmall+'>'+' tmpFont2: <'+tmpFont2+'>');
end; //for j..
end; //For i..
writeln('Settings: CheckShadow: <'+strCheckShadow+'> CheckOutline: <'+strCheckOutline+'>'+' Strict: <'+strStrict+'> Range Type #'+inttostr(Range)+' Search took '+inttostr(Round((GetSystemTime-StartTime)/1000))+' Seconds');
end;

{======================================================================+
Main Program
+======================================================================}
begin
ActivateClient;
UserSetup;
Setup;
for TolLoop := 1 to Loop do begin
if (Range = 0) then begin //if Range is 0 then loop once through all the range(1-12)
for Range := 1 to 11 do begin //otherwise it will just execute the selected range
GetText(False, False, false, Tolerance);
GetText(False, True, false, Tolerance);
GetText(False, False, True, Tolerance);
GetText(False, True, True, Tolerance);

GetText(True, False, false, Tolerance);
GetText(True, True, false, Tolerance);
GetText(True, False, True, Tolerance);
GetText(True, True, True, Tolerance);
end; //for Range...
end else begin
GetText(False, False, false, Tolerance);
GetText(False, True, false, Tolerance);
GetText(False, False, True, Tolerance);
GetText(False, True, True, Tolerance);

GetText(True, False, false, Tolerance);
GetText(True, True, false, Tolerance);
GetText(True, False, True, Tolerance);
GetText(True, True, True, Tolerance);
end; //if/else Range = 0
Tolerance := Tolerance + IncTol;
end; //for i...
end.

Liquid

2006-03-19 07:53:17

From: Flyboy
If you are planning to use GetTextAtEx, I made this little utility to test every possible setting. This uses all the normal fonts for RS2 but you can substitute your own font. Just let it rip and then scan the results for the best settings for your needs.



{
GetTextAtEx - Exhaustive Tester by Flyboy

This is a tool to be used by scripters who are wanting to use the function
GetTextAtEx. Instead of having to manually experiment with multiple setting to
find the perfect match, just use this script and it will test all possible
settings allowing you to make an informed decision as to what settings should be
used in your script.

This script was writen and published with the express intent to further the
cheating community. If you find this useful, site me in your script equal to
your level of appreaciation. Please feel free to copy, tweak and use this
script and any concepts you glean from it in any way you find useful but please
give me credit where it is due.

Cheers,
-Flyboy

Here's your step-by-step guide:
1. Take a screen-shot of what you want to test and open in ms-paint
2. open this script in SCAR ver 2.03 or later
3. drag crosshairs over picture in paint
4. adjust the settings in 'Procedure UserSetup;' section
5. click run
6. go make coffee while it runs the test (you'll need it when look through data)
6. scroll through the results and find what settings gave you the best results
7. post your findings in the forum where you downloaded this script, GetTextEx
is one of the least used functions, so your findings will be appreciated by
all scripters.
}
program GetTextAtEx_ExhaustiveTesterbyFlyboy;

var
TradeText1Color: integer;
TolLoop, MinSpacing, MaxSpacing, Loop, IncTol, Tolerance, Length: integer;
UpChars,CharsChat,Fontsmall,Font2 : integer;
Range : integer;
strRange : string;
tx1, ty1, tx2, ty2 : integer;
{======================================================================+
Setup Variables below
+======================================================================}
Procedure UserSetup;
Begin
tx1 := 309; //set x, y values for the upper left corner of search box
ty1 := 238;
tx2 := 457; //set x, y values for the bottom right corner of search box
ty2 := 250;

TradeText1Color := 65535; //color of text you are searching for.
//-1 for any color
Tolerance := 0; //initial tolerance level for first loop
Loop := 1; //(1-20) Number of times you want to loop with greater tolerance
// each loop
IncTol := 0; //amount to incrase tolerance each loop
Length := 1; //Number of characters at a time to look for
MinSpacing := 0; //Minimum Spacing between characters
MaxSpacing := 5; //Maximum spacing between characters
Range := 0; //Currently set to try all 11 posibilities... see below for chart
// 0 = **Will loop once through all the range
// 1 = tr_AllChars - read all characters;
// 2 = tr_BigLetters - read capital Latin letters;
// 3 = tr_SmallLetters - read lowercase Latin letters;
// 4 = tr_Digits - read digits;
// 5 = tr_BigSymbols - read symbols that are big in size, like "=", "%", "$", etc;
// 6 = tr_SmallSymbols - read small symbols like ".", ",", "'", etc;
// 7 = tr_SecondTableChars - read symbols with character code above 127;
// 8 = tr_Letters = tr_BigLetters or tr_SmallLetters;
// 9 = tr_AlphaNumericChars = tr_Letters or tr_Digits;
//10 = tr_Symbols = tr_BigSymbols or tr_SmallSymbols;
//11 = tr_NormalChars = tr_AlphaNumericChars or tr_Symbols;
End;
{************* Do not Touch below this point **************************}


{======================================================================+
Standard Setup Junk below: ie: set varables, load dtms, bitmaps etc.
+======================================================================}
Procedure Setup;
Begin
UpChars:= LoadChars2(AppPath + 'Charsrs22\');
CharsChat:= LoadChars2(AppPath + 'CharsChat2\');
Fontsmall:=LoadChars2(AppPath + 'CharsChat2\fontsmall\');
Font2:=LoadChars2(AppPath + 'CharsChat2\font2\');
LoadChars('');
end;

{======================================================================+
Look on trade window
+======================================================================}
procedure GetText(CheckShadow, CheckOutline, Strict:boolean; Tol:integer);
var
strCheckShadow,strCheckOutline,strStrict,
tmpUpChars, tmpCharsChat, tmpFontsmall, tmpFont2: string;
i, j, StartTime : integer;
begin
if CheckShadow then
strCheckShadow := 'true'
else
strCheckShadow := 'false'
if CheckOutline then
strCheckOutline := 'true'
else
strCheckOutline := 'false'
if Strict then
strStrict := 'true'
else
strStrict := 'false'

StartTime := GetSystemTime;

writeln('');
writeln('Settings: Tolerance = '+inttostr(Tol)+' CheckShadow: '+strCheckShadow+' CheckOutline: <'+strCheckOutline+'>'+' Strict: <'+strStrict+'> Range Type #'+inttostr(Range));
strRange := 'tr_AllChars';
for i := tx1 to tx2 do begin
for j := ty1 to ty2 do begin
{
if (Range = 0) then begin //if Range is 0 then loop once through all the range(1-12)
for Range := 1 to 11 do begin //otherwise it will just execute the selected range
case Range of
1: begin // 'tr_AllChars';//read all characters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
MoveMouse(i, j);
end;
2: begin // 'tr_BigLetters';// - read capital Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
MoveMouse(i, j);
end;
3: begin // 'tr_SmallLetters';// - read lowercase Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
MoveMouse(i, j);
end;
4: begin // 'tr_Digits';// read digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
MoveMouse(i, j);
end;
5: begin //'tr_BigSymbols';// - read symbols that are big in size, like "=", "%", "$", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow,
CheckOutline, MinSpacing, MaxSpacing,
TradeText1Color, Length,
Strict, tr_BigSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
MoveMouse(i, j);
end;
6: begin // 'tr_SmallSymbols';// - read small symbols like ".", ",", "'", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
MoveMouse(i, j);
end;
7: begin // 'tr_SecondTableChars';// - read symbols with character code above 127;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
MoveMouse(i, j);
end;
8: begin //'tr_Letters';// = tr_BigLetters or tr_SmallLetters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
MoveMouse(i, j);
end;
9: begin // 'tr_AlphaNumericChars';// = tr_Letters or tr_Digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
MoveMouse(i, j);
end;
10: begin // 'tr_Symbols';// = tr_BigSymbols or tr_SmallSymbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
MoveMouse(i, j);
end;
11: begin //'tr_NormalChars';// = tr_AlphaNumericChars or tr_Symbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
MoveMouse(i, j);
end;
end; //case Range...
end; //for Range..
end else begin
}
case Range of
1: begin // 'tr_AllChars';//read all characters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AllChars);
MoveMouse(i, j);
end;
2: begin // 'tr_BigLetters';// - read capital Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigLetters);
MoveMouse(i, j);
end;
3: begin // 'tr_SmallLetters';// - read lowercase Latin letters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallLetters);
MoveMouse(i, j);
end;
4: begin // 'tr_Digits';// read digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Digits);
MoveMouse(i, j);
end;
5: begin //'tr_BigSymbols';// - read symbols that are big in size, like "=", "%", "$", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow,
CheckOutline, MinSpacing, MaxSpacing,
TradeText1Color, Length,
Strict, tr_BigSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_BigSymbols);
MoveMouse(i, j);
end;
6: begin // 'tr_SmallSymbols';// - read small symbols like ".", ",", "'", etc;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SmallSymbols);
MoveMouse(i, j);
end;
7: begin // 'tr_SecondTableChars';// - read symbols with character code above 127;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_SecondTableChars);
MoveMouse(i, j);
end;
8: begin //'tr_Letters';// = tr_BigLetters or tr_SmallLetters;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Letters);
MoveMouse(i, j);
end;
9: begin // 'tr_AlphaNumericChars';// = tr_Letters or tr_Digits;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_AlphaNumericChars);
MoveMouse(i, j);
end;
10: begin // 'tr_Symbols';// = tr_BigSymbols or tr_SmallSymbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_Symbols);
MoveMouse(i, j);
end;
11: begin //'tr_NormalChars';// = tr_AlphaNumericChars or tr_Symbols;
tmpUpChars := GetTextAtEx(i, j, Tol, UpChars, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpCharsChat := GetTextAtEx(i, j, Tol, CharsChat, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFontsmall := GetTextAtEx(i, j, Tol, Fontsmall, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
tmpFont2 := GetTextAtEx(i, j, Tol, Font2, CheckShadow, CheckOutline, MinSpacing, MaxSpacing, TradeText1Color, Length, Strict, tr_NormalChars);
MoveMouse(i, j);
end;
end; //case Range...

{ end;
}
if not (trim(tmpUpChars) = '') or not (trim(tmpCharsChat) = '') or not (trim(tmpFontsmall) = '') or not (trim(tmpFont2) = '') then
writeln('x: '+inttostr(i)+' y: '+inttostr(j)+' tmpUpChars: <'+tmpUpChars+'>'+' tmpCharsChat: <'+tmpCharsChat+'>'+' tmpFontsmall: <'+tmpFontsmall+'>'+' tmpFont2: <'+tmpFont2+'>');
end; //for j..
end; //For i..
writeln('Settings: CheckShadow: <'+strCheckShadow+'> CheckOutline: <'+strCheckOutline+'>'+' Strict: <'+strStrict+'> Range Type #'+inttostr(Range)+' Search took '+inttostr(Round((GetSystemTime-StartTime)/1000))+' Seconds');
end;

{======================================================================+
Main Program
+======================================================================}
begin
ActivateClient;
UserSetup;
Setup;
for TolLoop := 1 to Loop do begin
if (Range = 0) then begin //if Range is 0 then loop once through all the range(1-12)
for Range := 1 to 11 do begin //otherwise it will just execute the selected range
GetText(False, False, false, Tolerance);
GetText(False, True, false, Tolerance);
GetText(False, False, True, Tolerance);
GetText(False, True, True, Tolerance);

GetText(True, False, false, Tolerance);
GetText(True, True, false, Tolerance);
GetText(True, False, True, Tolerance);
GetText(True, True, True, Tolerance);
end; //for Range...
end else begin
GetText(False, False, false, Tolerance);
GetText(False, True, false, Tolerance);
GetText(False, False, True, Tolerance);
GetText(False, True, True, Tolerance);

GetText(True, False, false, Tolerance);
GetText(True, True, false, Tolerance);
GetText(True, False, True, Tolerance);
GetText(True, True, True, Tolerance);
end; //if/else Range = 0
Tolerance := Tolerance + IncTol;
end; //for i...
end.




Thankyou I will test now.

Liquid

2006-03-19 16:16:45

From: Liquid
Thankyou I will test now.



Ok well, does it return like a true if it even finds the text? Cause I don't know if it finds.

masquerader

2006-03-20 19:02:06

gettextatex wouldnt return anything if it didnt work :p
you could also use istextinarea to test it