Hey guys, I have just begun writing an updated air runecrafter and found that the getrunenergy function was non-existent (it has not yet been updated). I have created a make-do function which can be used to approximate it pretty accurately (within 5%). Here is the function if it would be of use to anyone:
Code:
// GET THE RUN ENERGY PERCENTAGE
function GetRunEnergy: Integer;
var
TPA1, TPA2 : TPointArray;
k, p, h, c, percApprox : integer;
j : TBox;
begin
findColorsTolerance(TPA1, 1126294,761, 21, 791, 50, 30); // Creates a TPointArray of matching points in the run icon area
//smartImage.debugTPA(TPA1);
j := GetTPABounds(TPA1); // Convert the TPArray bounds to a TBox
c := j.getHeight(); // Find the height of the TBox
percApprox := Round(3.846*c); // Thus, find the percentage- 100% was ~26
WriteLn(percApprox); // Print the approximate percentage
Result := percApprox; // Make the result equal to the percentage
end;
I understand that this needs some work but it does its job.