Code: Select all
Gui, +AlwaysOnTop
Gui, Add, Button, x0 y0 h50 w50 gSubmit
Loop, read, %A_ScriptDir%\Movie.xml,
{
IfInString, A_LoopReadLine, <Title>, GoSub, AddCheck
IfInString, A_LoopReadLine, <Trailer>, break
}
Gui, Show
Return
Submit:
Gui, Submit, Nohide
GuiControlGet, NEED-VAR?
If (NEED-VAR = 0)
{
msgbox none
}
Else
{
msgbox NEED-VAR?
}
pause
AddCheck:
{
Gui, Add, CheckBox, NEED-VAR?, %A_LoopReadLine%
}
Return
My idea with the code above was to store each line in a check box variable. But I would need something like a loop iteration +1* for the variable but I dont know how to implement it or if it would even work as it could be hundreds, maybe thousands of lines.
I hope im not asking to much.
EDIT* I misunderstood what loop iteration is...
Code: Select all
Gui, +AlwaysOnTop
Gui, Add, Button, x0 y0 h50 w50 gSubmit
LineText := []
Loop, read, %A_ScriptDir%\Movie.xml,
{
IfInString, A_LoopReadLine, <Title>, GoSub, AddCheck
IfInString, A_LoopReadLine, <Trailer>, break
}
Gui, Show, h300 w300
Return
Submit:
Gui, Submit, Nohide
GuiControlGet, NEED-VAR?
If (NEED-VAR = 0)
{
msgbox none
}
Else
{
msgbox ALL BOXES CHECKED?
}
pause
AddCheck:
{
LineText.Insert(A_LoopReadLine)
Gui, Add, CheckBox, NEED-VAR? , %A_LoopReadLine%
}
Return