你单独运行我那段代码就知道行不行了~~
如果要加在这里也最好加在循环后Func _test()
Local $foo, $line, $lines, $currentRead
$a = TimerInit()
$zx = GUICtrlRead($xz)
$foo = Run(@ComSpec & " /c " & 'Format ' & $zx & '/FS:FAT32/V:Haha' & $format & 'X/Y', "", @SW_HIDE, $STDOUT_CHILD)
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
GUICtrlSetData($myedit, $line, -1)
FileWrite(@ScriptDir & "\1.txt", $line & @CRLF)
WEnd
_FileReadToArray(@ScriptDir & "\1.txt", $aArray2)
For $x = 1 To $aArray2[0]
If $aArray2[$x] = "" Then
_FileWriteToLine(@ScriptDir & "\1.txt", $x - $z, '', 1)
$z += 1
EndIf
Next
$b = TimerDiff($a)
$c = $b / 1000
_TicksToTime(Int($b), $H, $M, $S)
MsgBox(64, "Finish", "This format cost you " & $H & ' Hours ' & $M & ' Minutes ' & $S & ' Seconds')
EndFunc ;==>_test
|