Hi, i have this script For $iii=1 To _FileCountLines("stat.txt")
$sLine = FileReadLine("stat.txt",$iii)
$GAhti = $iii - 3
$GAati = $iii + 3
$BPhti = $iii - 3
$BPati = $iii + 3
$SOGhti = $iii - 3
$SOGati = $iii + 3
$SOThti = $iii - 3
$SOTati = $iii + 3
$BShti = $iii - 3
$BSati = $iii + 3
If StringInStr($sLine,"Goal Attempts") <> 0 Then
$GAht = FileReadLine("stat.txt",$GAhti)
$GAat = FileReadLine("stat.txt",$GAati)
EndIf
If StringInStr($sLine,"Ball Possession") <> 0 Then
$BPht = FileReadLine("stat.txt",$BPhti)
$BPat = FileReadLine("stat.txt",$BPati)
EndIf
If StringInStr($sLine,"Shots on Goal") <> 0 Then
$SOGht = FileReadLine("stat.txt",$SOGhti)
$SOGat = FileReadLine("stat.txt",$SOGati)
EndIf
If StringInStr($sLine,"Shots off Goal") <> 0 Then
$SOTht = FileReadLine("stat.txt",$SOThti)
$SOTat = FileReadLine("stat.txt",$SOTati)
EndIf
If StringInStr($sLine,"Blocked Shots") <> 0 Then
$BSht = FileReadLine("stat.txt",$BShti)
$BSat = FileReadLine("stat.txt",$BSati)
EndIf
If $BPht <> "" Then
MsgBox(1,"", "Ball possession HT" & ': ' & $BPht & @LF & "Goal attempts HT" & ': ' & $GAht & @LF & "Shots on Goal HT" & ': ' & $SOGht & @LF)
EndIf
MsgBox(1,"",$GAht)
MsgBox(1,"",$SOGht)
$GAht = ""
$GAat = ""
$BPht = ""
$BPat = ""
$SOGht = ""
$SOGat = ""
$SOTht = ""
$SOTat = ""
$BSht = ""
$BSat = ""
Next
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
EndIf
_IEQuit($aaaa)
Nextin this way, msgbox returns literally empty x times .... if i remove those lower 2 msgboxes, msgbox returns only the string that's in IF .... which means If $BPht <> "" Then
returns only $BPht value in msgbox, If $GAht <> "" Then
returns only $GAht in msbox, Could you please help me with it?