I think problem is here
Simba Code:
function GetMidPrice: integer;
begin
writeln('GetMidPrice is: ' + GetTextAtExWrap(296, 186, 440, 199, 0, 10, 1, 6400255, 5, 'UpCharsEx'));
result := StrToInt(GetNumerals(GetTextAtExWrap(296, 186, 440, 199, 0, 10, 1, 6400255, 5, 'UpCharsEx')));
end;
if GetTextAtExWrap(296, 186, 440, 199, 0, 10, 1, 6400255, 5, 'UpCharsEx') returns empty string or string without numbers then you got this exception.
Fix:
Simba Code:
function GetMidPrice: integer;
var text :string;
begin
writeln('GetMidPrice is: ' + GetTextAtExWrap(296, 186, 440, 199, 0, 10, 1, 6400255, 5, 'UpCharsEx'));
text := GetNumerals(GetTextAtExWrap(296, 186, 440, 199, 0, 10, 1, 6400255, 5, 'UpCharsEx'))
if High(text)>0 then
result := StrToInt(text);
end;