Jump to content
Sign in to follow this  
timoo91

Detect cd/dvd drivers?

Recommended Posts

timoo91

Hello!

i'm working on script that automaticaly Ejects/Closes the cd/dvd-rom drivers in specific time

my code

#include <GUIConstants.au3>

$Form1 = GUICreate("TimooEject", 131, 96)
$drive_letter = GUICtrlCreateCombo("G:", 10, 15, 110, 25)
GUICtrlSetData(-1, "H:|I:")
$open = GUICtrlCreateButton("Open", 10, 40, 50, 20, 0)
$close = GUICtrlCreateButton("Close", 70, 40, 50, 20, 0)
$auto = GUICtrlCreateButton("Open/Close in 10 sec", 10, 65, 110, 20, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        
        Case $open
        CDTray(GUICtrlRead($drive_letter),"open")
        Case $close
        CDTray(GUICtrlRead($drive_letter),"close")
    Case $auto
        CDTray(GUICtrlRead($drive_letter),"open")
        Sleep(10000)
        CDTray(GUICtrlRead($drive_letter),"close")
    EndSwitch
WEnd

but the problem is i can't detect installed cd/dvd-rom driver(s) letter.

so how can i detect the installed cd/dvd-rom drivers details(letter,type etc...)?

Thanks!


Laptop:Toshiba A100CPU:1.73 Centrino DuoHDD:160 GBRAM:1GBGPU:GeForce Go 7600 256MBOS:Win XPMy scripts[list][*]Timoo Eject[/list]

Share this post


Link to post
Share on other sites
Danny35d

Look at the help file for DriveGetDrive()

Edited by Danny35d

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×