Voilà mon problème commence dés fois au bout d'une trentaine de Func GetMPLSInfoFunc() dés fois vers la centaine ce qui est plutôt alléatoire avec ce code d'érreur
Array variable has incorrect number of subscripts or subscript dimension range exceeded.
Pour moi le problème se trouve dans le While du moins je le pense, c'est pour çà que j'ai besoin de vos lumières ► Afficher le texte
Code : Tout sélectionner
FileDelete($ProgramSrc&"Tree Log.txt")
Func GetMPLSInfoFunc()
$SendTree = ''
$MPLS = StringLeft($MPLSs, 5) & '.mpls'
$MPLSs = StringTrimLeft($MPLSs, 5)
$cmd = CHR(34)& $ProgramSrc&"Programme.exe" &CHR(34)&" -progressnumbers "&CHR(34)& $PathMPLS&$MPLS &CHR(34)
; ====>
Local $Stream = Run(@ComSpec & ' /c "' & $cmd & '"', @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
; <====
;
; ====>
While 1
$line = StdoutRead($Stream)
If $line <>'' Then
;$result = StringInStr( $line, "analyze:")
$result = StringLeft($line, 8)
If $result = "analyze:" Then
$line = stringreplace ( $line, @LF, "")
SendScriptMMB($MMBTitle, "LoadText("&CHR(34)&"Status"&CHR(34)&","&CHR(34)& $MPLS & ' ' & $line &CHR(34)&")")
Else
$SendTree = $SendTree & $line
EndIf
EndIf
If @error Then
;If ProcessExists($Stream) Then
;Else
ExitLoop
EndIf
Wend
$SendTree = StringReplace ( $SendTree, " ", "")
$SendTree = StringReplace ( $SendTree, "(left eye)", " (left eye)")
$SendTree = StringReplace ( $SendTree, " "& @CRLF, @CRLF)
$SendTree = StringReplace ( $SendTree, @CRLF & " ", " ")
$SendTree = $SendTree & 'Done..........'
$SendTree = StringReplace ( $SendTree, @CRLF & "Done..........", "")
$SendTree = StringReplace ( $SendTree, "M2TS", $MPLS)
$result = StringInStr( $SendTree, "(right eye)")
If $result = '0' Then
$3D = "2D"
Else
$3D = "3D"
EndIf
$SendTree = $3D & ', ' & $SendTree
$Delete = StringInStr( $SendTree, ":", 0, 1) -2
$Delete = StringMid( $SendTree, $Delete, 8)
$SendTree = stringreplace ( $SendTree, $Delete,"")
$SendTree = StringReplace ( $SendTree, ",,", ",")
$SendTree = StringReplace ( $SendTree, @CRLF & "Bitstream parsing for track", ", Bitstream parsing for track")
$SendTree = StringReplace ( $SendTree, @CRLF & "Demuxing this track may still produce correct results - or not.", " Demuxing this track may still produce correct results - or not.")
$SendTree = StringReplace ( $SendTree, "," & @CRLF, @CRLF)
$HMS = StringSplit($Delete, ":")
$Time = StringFormat('%02d:%02d:%02d', $HMS[1], $HMS[2], $HMS[3])
$SendTree = $Time & ', ' & $SendTree
If $MPLSs <> '' Then
$SendTree = $SendTree & @CRLF
FileWrite ($ProgramSrc&"Tree Log.txt", $SendTree)
GetMPLSInfoFunc() ; Run The Script => GetMPLSInfoFunc()
EndIf
; <====
EndFunc


