Jump to content

Controlling CDROM


 Share

Recommended Posts

  • Moderators

Are removable media controls (opening/closing CDROM) available on AutoIT? I've tried accessing some files on D:/ drive even if it had no CD in it but I always get error File not found (or something like that)... :whistle:

Well... without a script, let's see if we can all guess what your issue is:

D:\

Maybe?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

cough

; Open the CD tray on drive D:

CDTray("D:", "open")

Sleep(1000)

CDTray("D:", "closed")

Maybe:

Failure: Returns 0 if drive is locked via CD burning software or if the drive letter is not a CD drive.

CDTray("X:", "close") tends to return 0 even on laptop-style cd trays that can only be closed manually.

Link to comment
Share on other sites

cough

; Open the CD tray on drive D:

CDTray("D:", "open")

Sleep(1000)

CDTray("D:", "closed")

Maybe:

Failure: Returns 0 if drive is locked via CD burning software or if the drive letter is not a CD drive.

CDTray("X:", "close") tends to return 0 even on laptop-style cd trays that can only be closed manually.

Thanks, that's what I needed.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...