xavier880819
发表于 2009-9-1 10:12:23
那个“10984811”是谁啊!!!这样恶意顶弄得我们的提问帖子大家都看不到了
afan
发表于 2009-9-1 10:22:15
你单独运行我那段代码就知道行不行了~~
如果要加在这里也最好加在循环后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
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
xavier880819
发表于 2009-9-1 11:18:49
谢谢afan,现在倒是可以比较正常的运行了~~