#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=C:\oddtest.kxf
$Form1 = GUICreate("ODD Test", 641, 408, 237, 133)
$Pic1 = GUICtrlCreatePic("odd11.JPG", 0, 0, 640, 250, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("ODD Letter:", 12, 256, 210, 37)
GUICtrlSetFont(-1, 14, 800, 0, "Arial Black")
$Label2 = GUICtrlCreateLabel("ODD Model:", 12, 301, 160, 37)
GUICtrlSetFont(-1, 14, 800, 0, "Arial Black")
$Label3 = GUICtrlCreateLabel("ODD Status:", 12, 348, 160, 37)
GUICtrlSetFont(-1, 14, 800, 0, "Arial Black")
$Button1 = GUICtrlCreateButton("OPEN DVD", 492, 344, 129, 41, 0)
GUICtrlSetFont(-1, 16, 400, 0, "黑体")
$Button2 = GUICtrlCreateButton("DVD TEST", 492, 252, 129, 41, 0)
GUICtrlSetFont(-1, 16, 400, 0, "黑体")
$Button3 = GUICtrlCreateButton("PASS", 492, 344, 129, 41, 0)
GUICtrlSetFont(-1, 16, 400, 0, "黑体")
$Button4 = GUICtrlCreateButton("FAIL", 492, 252, 129, 41, 0)
GUICtrlSetFont(-1, 16, 400, 0, "黑体")
$Label4 = GUICtrlCreateLabel("Not found letter", 135, 257, 200, 32)
GUICtrlSetFont(-1, 14, 800, 0, "Arial Black")
GUICtrlSetColor(-1, 0x008000)
$Label5 = GUICtrlCreateLabel("not found ODD", 135, 303, 360, 32)
GUICtrlSetFont(-1, 14, 800, 0, "Arial Black")
GUICtrlSetColor(-1, 0x008000)
$Label6 = GUICtrlCreateLabel("No Ready!", 135, 350, 200, 32)
GUICtrlSetFont(-1, 14, 800, 0, "Arial Black")
GUICtrlSetColor(-1, 0x008000)
GUISetState(@SW_SHOW)
GUICtrlSetState (9,$GUI_HIDE)
GUICtrlSetState (10,$GUI_HIDE)
#EndRegion ### END Koda GUI section ###
ControlFocus("ODD TEST", "弹出光驱", 7)
$odd = DriveGetDrive('cdrom')
GUICtrlSetData($Label4, StringUpper($odd[1]) & "\")
info()
Func info()
$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$odd1 = $objWMIService.ExecQuery ("Select * from Win32_CDROMDrive")
For $object In $odd1
GUICtrlSetData($Label5, StringStripWS($object.name, 1))
Next
EndFunc ;==>info
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
GUICtrlSetState (8,$GUI_HIDE)
GUICtrlSetState (7,$GUI_HIDE)
GUICtrlSetState (9,$GUI_SHOW)
GUICtrlSetState (10,$GUI_SHOW)
Case $Button1
GUICtrlSetState (9,$GUI_HIDE)
GUICtrlSetState (10,$GUI_HIDE)
$odd = DriveGetDrive('cdrom')
If Not @error Then CDTray($odd[1], "open")
EndSwitch
WEnd
请问各位大侠:
1.我该如何将光驱中的MP3文件做成一个M3U文件,不通过DOS命令。
2.如何读取光驱中的文件.
AU3中好像并没有类似DOS DIR命令。如果有的话,请详细说明。谢谢。。。 |