请大家帮我看看,我运行了却直接就得答案了,不知道错在哪里,而U盘根本就没有被格式化。#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Guicreate("Fomater", 430, 160, -1, -1)
Dim $Input1,$Input2,$xz
$Button1 = GuiCtrlCreateButton("Select Disc", 260, 30, 150, 20)
$Button2 = GuiCtrlCreateButton("Start Format Disc", 70, 80, 250, 30)
$Input1 = GUICtrlCreateInput("", 20, 30, 230, 20,-1)
GuiSetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$xz = FileSelectFolder("Select The Disc", "", 4)
If @error Then ContinueLoop
GUICtrlSetData($Input1, $xz)
Case $Button2
$Input2 = GUICtrlRead($Input1)
$f = MsgBox(1 + 48, 'Attention', 'Are you sure you want to format this disc?')
Select
Case $f = 1
$a = TimerInit()
RunWait(@ComSpec & " /c " & 'FORMAT' & $Input2 & 'FS:FAT32/V:HaHa/Q/X/Y', @SW_HIDE)
$b = TimerDiff($a)
Msgbox(0,0,"This format cost you" & $b / 1000 & "Seconds")
Case $f = 2
ContinueLoop
EndSelect
EndSwitch
Wend
|