Jump to content
Macro Express Forums

How to recognise DVD/CD insertion


Recommended Posts

Dear All,

 

I searched te forums, but do not seem to be able to find anything on this matter.

 

I want to recognise if a DVD/CD is inserted in an optical drive, and depending perform certain actions. I thought to do this by checking if a drive/folder/file exists on the supposed inserted DVD/CD. In case there's no optical disc inserted though an exception error c0000013 occurs which can't be handled using the catch error method.

 

-How do you people deal with checking if a DVD/CD is inserted in the optical drive, or at least recognise if so?

 

Thanks for any hints and tips provided.

 

Best regards,

Link to comment
Share on other sites

Hi,

 

The simplest way I would approach it would be to start my macro with:

Open Folder in Explorer to "D:\"
where D: is my optical drive.

 

Then I'd have it test which of these windows appears:

 

MX-DetectDisc.jpg

 

MX-NoDisc.jpg

 

 

Alternatively, and more elegantly, there may be a script around somewhere that would return a YES or NO or similar. But I couldn't find it in a fair bit of googling so resorted to the above.

 

As for the window identification, If MX doesn't recognise their respective titles (it sometimes fails) then pixel testing might do it.

 

--
Terry, East Grinstead, UK

Link to comment
Share on other sites

Thanks terrypin,

 

For what I wanted to so with it, I've in the mean time found a program called AutoCopy which will do the trick to copy content to HD automatically.

 

I was looking for this because I wanted to copy, and recode some of the 600+ VCD's/SVCD's I made in the past, for use with a mediaplayer on my network.

 

For the sake of wanting to know, I've been looking more deeply in the problem too, and I think it has something to do with the type of DVD there's in my computer, a DVD-RAM. It opens an empty window, even when there's no CD/DVD in it.

 

Your tip though might just work, and I going to have a look into it anyway. Just for the sake of curiousity.

 

Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...