DVD Problem

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
koleviko
Junior Coder
Posts: 45
Joined: Thu Nov 20, 2008 2:59 pm

DVD Problem

Post by koleviko » Mon Dec 22, 2008 2:51 pm

Hello. The button on my DVD recording device is broken and I was wondering whether it is possible through macro script Open and Close her .

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Mon Dec 22, 2008 6:24 pm

This script opens my DVD and CD drive. I'm not sure about closing them but you should be able to close manually.

Code: Select all

VBSTART
Sub EjectTray
  Set oWMP = CreateObject("WMPlayer.OCX.7")
  Set colCDROMs = oWMP.cdromCollection

  If colCDROMs.Count >= 1 Then
    For i = 0 to colCDROMs.Count - 1
      colCDROMs.Item(i).Eject
    Next ' cdrom
  End If
End Sub
VBEND

VBRun>EjectTray
I hope this helps

koleviko
Junior Coder
Posts: 45
Joined: Thu Nov 20, 2008 2:59 pm

Re: DVD Problem

Post by koleviko » Mon Dec 22, 2008 6:49 pm

Thank you, but there is a problem. First DVD opens but does not close. :( I want the process is automated, even if I could ask to be / Open and Close / 5 times or more below the line. Furthermore VBScript too large in volume 1.5mb :cry: , while the macro will be more than 50kb. Let when it is a Macro script not VBS.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Dec 26, 2008 7:26 pm

See WizMo or NirCmd or FastKake for command line utilities that include tray open/close functions. You can use Macro Scheduler to call the command lines as needed with Run Program.

Wizmo ( http://www.grc.com/wizmo/wizmo.htm ):
DRIVE OPEN (EJECT) and CLOSE (LOAD)

open — opens the system's default CDROM drive tray.
Example: wizmo open
close — closes the system's default CDROM drive tray.
Example: wizmo close
open={drive:} — open or eject specific removable drive media.
----------------------------

NirCmd ( http://www.nirsoft.net/utils/nircmd.html ):
Open the door of J: CD-ROM drive nircmd.exe cdrom open j:
Close the door of Y: CD-ROM drive nircmd.exe cdrom close y:
-----------------------------

FastKake: ( http://www.phy.uni-bayreuth.de/~btp344/ ... index.html )
Adds shortcuts to your system to open/close CD drive
Screenshot and summary at http://www.makeuseof.com/tag/windows-sy ... -fastkake/
--------------------------------
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

koleviko
Junior Coder
Posts: 45
Joined: Thu Nov 20, 2008 2:59 pm

Post by koleviko » Fri Dec 26, 2008 11:06 pm

Thanks. Excellent programs. :D Pity that macro not to write sript 2 procedures for opening and closing of the CD. :?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts