Tim0suprem0
2010-04-30 15:49:33
Might be helpful? I don't know how it works with a whole new font.
You could probably just use color to see if the bar is open or not, but since it opens over the mainscreen, I figured it was safest to search for text. EDIT: Added Frement's method of checking for the bar with color.
Font is attached (doesn't have the colon ":"). Credit to Frement for making 90% of the font :)
Function GetTotalXPGained : Integer;
var XPChars : integer;
begin
XPChars := LoadChars2(AppPath + '\Fonts\XPBarFont\');
//if (not(CountColorTolerance(16777215, 430, 55, 515, 70, 3) >= 50)) then
if (not (XPBarOpen) ) then //thanks Frement and Home
Mouse(531,64,2,2,true);//opens bar
Result:= StrToInt(GetTextAtEx(455, 57, 10, XPChars, False, False, 0, 0, -1, 8, False, tr_Digits))
FreeChars2(XPChars);
Mouse(531,64,2,2,true);//closes bar
end;You could probably just use color to see if the bar is open or not, but since it opens over the mainscreen, I figured it was safest to search for text. EDIT: Added Frement's method of checking for the bar with color.
Font is attached (doesn't have the colon ":"). Credit to Frement for making 90% of the font :)