CDTray 1.0

By N3M3S1S on Oct 10, 2010

CD tray opener I made for mIRC DeluXe 1.5.82+. In mIRC DeluXe you press F5 (or select it from the popup menus) and it launched the program and opens the CD tray, you place in or remove the CD and press any key, the CD tray closes and program exits. Windows then takes the necessary action i.e. auto play, or choose action etc. You can use it in your mIRCs or programs!

Make sure you add the libwinmm.a to the project (in Dev-C++) or it wont work!

#include <iostream>
#include <windows.h>
#include <mmsystem.h>

using namespace std;

int main()
{
    cout << "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»" <<endl;
    cout << "º                                CD Tray Opener 1.0                          º" <<endl;
    cout << "º                                  By Neo Nemesis                            º" <<endl;
    cout << "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ" <<endl;
    mciSendString("open CDAudio", NULL, 0, NULL);
    cout << "CD Tray is opening please wait..." << endl;
    mciSendString("set CDAudio door open", NULL, 0, NULL);
    cout << "CD Tray is open please place in or remove CD and ";
    system("pause");
    mciSendString("set CDAudio door closed", NULL, 0, NULL);
    mciSendString("close CDAudio", NULL, 0, NULL);
    return 0;
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.