Sorry I didn't want to abuse, but now I'm stuck at this part:
- Code: Select all
var
SubPatterns: TStringsArray;
Begin
SubPatterns:=SubMatchesRegEx(WideExtractBaseName(FileName),'(.*?)\[(\d+) by (\d+)\]',false);
if Length(SubPatterns) <=0 then exit;
FileName := FloatToStr(StrToFloat(SubPatterns[1]) / StrToFloat(SubPatterns[2]))
+ ' ~ ' + WideExtractBaseName(FileName) + WideExtractFileExt(FileName);
end.
I just changed IntToStr to FloatToStr and StrToInt to StrToFloat. The result is this:
FROM
Plane [696 by 52]
TO
13.384615384615 ~ Plane [696 by 52]
What can I do to limit the result to a certain number of decimal places? Sometimes I'll want 1 decimal point, or 2, etc. I tried to search for a while and study Pascal Script for a bit, but so far unsuccessful
The desirable result would be:
13.38 ~ Plane [696 by 52]
or even this if I can round more precisely:
13.39 ~ Plane [696 by 52]
Thank you very much anyway, if it wasn't for you it'd have taken a lot longer to even reach this step!