i have some text files 1, 2, 3, 4
based on file 2 and 3 the result file "full stats" (file 1) will be created
the result file is the most important file
file 4 contents will replace column 9 of the result file "full stats" (file 1)
and they will repeat, entire list repeats every time it ends when added
file 2 contents will replace column 6 of the result file "full stats" (file 1)
file 3 contents will replace column 1 of the result file "full stats" (file 1)
the result will depend on how long the lists 2 and 3 are
file 4 repeats over and over
a game DB patcher script Topic is solved
a game DB patcher script
- Attachments
-
- ahk program for db.rar
- (5.39 KiB) Downloaded 30 times
Re: a game DB patcher script
this is the result desired
Re: a game DB patcher script
plz help
i depend on it
i depend on it
Re: a game DB patcher script
Where are you so far with your script?
Re: a game DB patcher script Topic is solved
Code: Select all
#NoEnv
SetWorkingDir %A_ScriptDir%
FileRead, file1, full stats.txt
FileRead, file2, levels.txt
FileRead, file3, names.txt
FileRead, file4, imgs.txt
result := ""
fullstats := StrSplit(Trim(file1, "`r`n"), A_Tab)
file2 := StrSplit(Trim(file2, "`r`n"), "`r`n")
file3 := StrSplit(Trim(file3, "`r`n"), "`r`n")
file4 := StrSplit(Trim(file4, "`r`n"), "`r`n")
Loop, % Min(file2.MaxIndex(), file3.MaxIndex())
{
current := fullstats
current[9] := file4[Mod(A_index-1, file4.MaxIndex())+1]
current[6] := file2[A_index]
current[1] := file3[A_index]
result .= StrJoin(A_Tab, current*) "`n"
}
FileDelete, result.txt
FileAppend, %result%, result.txt
ExitApp
StrJoin(sep, params*) { ; by geek from https://autohotkey.com/boards/viewtopic.php?t=7124
for index,param in params
str .= sep . param
return SubStr(str, StrLen(sep)+1)
}
Ethereum: 0x3B2d1806F62Faee9e7d0F1B99105D5D1AE6E9Ce5
BTC: bc1qau34mefccamtf0hnnpu5mzfqelfz0cd3yts0sl