Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    228

    Grin Question about Dvd and CD media

    Hi:

    I have tested with success a little function for ejecting dvd and cd drive that were inbox in the media drive, but can`t find in help file any action or built-in function for introducing via script (logically you have to put fisically the dvd first...) or software so that unattendely the system insert dvd in you pc...Is there any way to do this?

    If is there any variable or so for referring to inserting dvd in pc, if so... How It should be written in AMS correctly?

    Thanks!

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Quote Originally Posted by autoplmst6 View Post
    Hi:

    I have tested with success a little function for ejecting dvd and cd drive that were inbox in the media drive, but can`t find in help file any action or built-in function for introducing via script (logically you have to put fisically the dvd first...) or software so that unattendely the system insert dvd in you pc...Is there any way to do this?

    If is there any variable or so for referring to inserting dvd in pc, if so... How It should be written in AMS correctly?

    Thanks!
    So you want to script a "close drive" as well as "open drive"?

    Not all drives support "close".
    I've seen some drives respond to the "eject" command (when open) to close
    it.

    Here's some vb code that might work for you (convert to lua/IR)

    Code:
    Private Declare Function mciSendString Lib “winmm.dll” Alias “mciSendStringA” (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
    
    mciSendString(“set cdaudio door open”, 0, 0, 0)
    mciSendString(“set cdaudio door closed”, 0, 0, 0)
    But remember, not all drives support close... (ala laptops)

    Do a google search for "api close dvd tray"


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  3. #3
    Join Date
    Dec 2005
    Posts
    228
    Hi Jassing:

    I have tested this sample using the dll action script for this dill (winmm.dll) before I was looking first in this forum and compiled until I got it;

    I attached the apz for a better idea according the vb scripts you gave me for this exercise, why do you say that perfoming this action it wouldn't supprot all kind manufacturer drives (lg, samsung, ...)?

    What problems do you had experienced with calling the winmm.dll?
    Attached Files

  4. #4
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Quote Originally Posted by autoplmst6 View Post
    why do you say that perfoming this action it wouldn't supprot all kind manufacturer drives (lg, samsung, ...)?
    some drives do not support being closed. Take a laptop's drive -- the 4 laptops we have here, not one supports being closed automatically; it must be manually shut.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts