$ET=0
$mypro="1.exe"
While 1
Sleep(100)
If ProcessExists($mypro) Then
$ST=TimerInit ( )
While 2
sleep(100)
If Not ProcessExists($mypro) Then
$ET=TimerDiff($ST)
ExitLoop
EndIf
WEnd
EndIf
If $ET<>0 Then ExitLoop
WEnd
MsgBox(0,0,$MYPRO&"运行了"&Int($ET/1000)&"秒"&int(mod($ET,1000))&"毫秒!")