This script do the job for me, but only in case if *.ts file exist:
#include <InetConstants.au3>
#include <WinAPIFiles.au3>
Example()
Func Example()
; Save the downloaded file to the temporary folder.
Local $sFilePath = _WinAPI_GetTempFileName(@TempDir)
; Download the file in the background with the selected option of 'force a reload from the remote site.'
Local $hDownload = InetGet("http://xtream.servidorfull.com:25461/live/Nildo/I7CLSx6JHy/4.ts", $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
; Wait for 2s and stop download.
Do
Sleep(2000)
Until InetGetInfo($hDownload, $INET_DOWNLOADREAD)
; Retrieve the number of total bytes received.
Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD)
; Close the handle returned by InetGet.
InetClose($hDownload)
; Display details about the total number of bytes read and the filesize.
MsgBox(64, "", "The total download size: " & $iBytesSize)
; Delete the file.
FileDelete($sFilePath)
EndFunc ;==>Example
But, if *.ts file does not exist, script never ends, why?