I haven't tested this, but it should work.
#include <Array.au3>
Func _asaving()
;WinWaitActive("eyeBeam","")
WinActivate("[CLASS:SUAWINCLIENTCLASS]", "")
ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "","{F9}")
$var = ControlGetText("[CLASS:DIAGNOSTICDIAG_CLASS]", "", "Edit1")
$lines = StringSplit($var, @CRLF, 1)
$lines = _ArrayUnique($lines, 1, 1) ;====> Remove duplicates from the 1-base index array
$words = " Call "
For $i = 1 To Ubound( $lines ) - 1
If StringInStr($lines[$i], $words) Then
ClipPut($lines[$i] & @CRLF)
$file = FileOpen("result.txt", 1)
; Check if file opened for writing OK
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
FileWriteLine($file, $lines[$i] & @CRLF)
FileClose($file)
EndIf
Next
;WinWaitActive("eyeBeam","")
WinActivate("[CLASS:SUAWINCLIENTCLASS]", "")
ControlSend("[CLASS:SUAWINCLIENTCLASS]", "", "","{F9}")
EndFunc