; Variable Declaration Global $TotalDurationMS $Var = "Ici, se trouvent les durées => Duration: 10:10:10.101 ici il y en à une deuxième => Duration: 01:01:01.010 fin de variable" While 1 Sleep(1) $result = StringInStr( $Var, "Duration:", 0, 1) If $result ='0' Then ExitLoop ; ======================================================== $Duration = StringMid( $Var, $result+10,12) $Delete = StringMid( $Var, 1, $result+21) $Var = stringreplace($Var, $Delete,"") ; ======================================================== $H = StringMid( $Duration, 1,2)*1000*60*60 $M = StringMid( $Duration, 4,2)*1000*60 $S = StringMid( $Duration, 7,2)*1000 $MS = StringMid( $Duration,10,3) $TotalMS = ($H + $M + $S + $MS) $TotalDurationMS = $TotalDurationMS + $TotalMS ; ======================================================== Wend MsgBox(0, "Durée Totale en millisecondes:", $TotalDurationMS) $TotalDurationMS = StringFormat('%.3f', $TotalDurationMS / 1000) $TotalSec = StringSplit($TotalDurationMS, ".") $TotalSec = $TotalSec[1] $TotalMSec = StringSplit($TotalDurationMS, ".") $TotalMSec = $TotalMSec[2] $H = Int ($TotalSec / 3600) $M = Int(($TotalSec - $H * 3600) / 60) $S = $TotalSec - $H * 3600 - $M * 60 $MS = $TotalMSec $TotalDuration = StringFormat('%02d:%02d:%02d:%03d', $H, $M, $S, $MS) MsgBox(0, "Durée Totale en format original:", $TotalDuration) $TotalDuration = StringFormat('%02d heures %02d minutes %02d secondes %03d millisecondes', $H, $M, $S, $MS) MsgBox(0, "Durée Totale en format personalisé:", $TotalDuration)