what I'm trying to achieve here is this:
1.Read a line from file inp.txt
2.Write the line to file tab.txt
3,Read a line from file out.txt
4.Write the line to file tab.txt in the SAME line
5.and so on keeping in mind the current line...
Following code is what I've come up with.
Issue is that it keeps writing the first line of the file out.txt over and over again no matter what the A_Index value is.
Code: Select all
Loop, read, inp.txt
{
FileAppend, %A_loopreadline%`t, tab.txt
count:=A_index
Loop, read, out.txt
{
if (a_index equals count)
{
;FileAppend, %A_loopreadline%`n, tab.txt
break
}
}
}
Code: Select all
Loop, read, inp.txt
{
FileAppend, %A_loopreadline%`t, tab.txt
count:=A_index
Loop, read, out.txt
{
if (a_index equals count)
{
MsgBox, % a_index "`t" count
FileAppend, %A_loopreadline%`n, tab.txt
break
}
}
}
Code: Select all
11
12
13
14
...
Any help would be appreciated! Thanks in advance.