droodled Posted July 11, 2015 Report Share Posted July 11, 2015 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, Quote Link to comment Share on other sites More sharing options...
terrypin Posted July 17, 2015 Report Share Posted July 17, 2015 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: 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 Quote Link to comment Share on other sites More sharing options...
droodled Posted July 18, 2015 Author Report Share Posted July 18, 2015 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.