Cause the number of lines changes from file to file I thought about to use the SetFormat command. But it seems not to work ...
With a static value (no variable) it has worked fine, using: SetFormat, float, 06.0
A shrinked code (without the SetFormat command) for testing 8)
Loop, read, a.txt, b.txt
{
LC++
If A_LoopReadLine <> %PrevA_LoopReadLine%
FileAppend, %A_LoopReadLine%`n
PrevA_LoopReadLine = %A_LoopReadLine%
IfInString, %A_LoopReadLine%, TLR
{
LC -= 2
FileAppend, TLR%LC%
}
}The format of the trailer has to be: TLRxxxxxxBTW:
I think the sample lines in AHK's help on SetFormat are not realy helpfull :cry:
- cause it's only a repeat of the syntax :oops:
Something like:
If number is 12.333333
SetFormat, float, 06.0 --> 000012
SetFormat, float, 0.2 --> 12.33
SetFormat, ...
that should point out directly what an unexperienced user will get if using ... :wink:
Have I ever mentioned that math wasn't my favourite at school :roll:




