the issue i face is : the text files get saved containing the exact given number except for the first text file small_txt_[1].txt that contain more.
plz help.
Code: Select all
; #Warn
#NoEnv
#MaxMem 512
ListLines Off
SendMode Input
SetBatchLines -1
Process, Priority,, High
SetWorkingDir %A_ScriptDir%
F2::Reload
Esc::ExitApp
F1::
FileSelectFile, SelectedFile, 1, % A_WorkingDir, Open a file, Text Documents (*.txt; *.bat)
InputBox, b, Info, How many lines in each *.txt, show, 250, 150
FileRead, var, % SelectedFile
s := 0, n := 1
Loop, Parse, var, `n, `r
{
ToolTip, % s++ . "`n" . n, 0, 0
if(s == b) {
Sleep, 10
s := 0, n++
} else {
FileAppend, % A_LoopField . "`n", % "small_txt_[" . n . "].txt"
}
} MsgBox, All Done