if TotalResultFound > 1ozzii wrote: With your code I have all the lines beetween Look Down: and *****
But I need to have the result ONLY if there is just one line
{
ResultText = More than 1 Result found
break
}
Code: Select all
text=
(
line1
line2
line3
Look Down:
ResultLine
ResultLine2
ResultLine3
******************************************************************************
)
loop, parse, text, `n
{
if A_LoopField = Look Down:
{
TextCreation = 1
continue ;Skip lines below and start a new iteration and begins a new one
;"a_index" count will be continued
}
if A_LoopField = ******************************************************************************
TextCreation = 0
if TextCreation = 1
{
ResultText .= A_LoopField "`r`n"
TotalResultFound++
if TotalResultFound > 1
{
ResultText = More than 1 Result found
break
}
}
}
msgbox, %TotalResultFound% `n`n%ResultText%