N30N3M3S1S Posted February 4, 2011 Share Posted February 4, 2011 (edited) Here is the first creation I have made in AutoIt. Its a remake of a console I redefined in C++, I remade it in AutoIt as a program to use on my mIRC or whatever use I come to it. Ready to compile and run Made to be assigned to a hotkey in the Fkey row. #include <GUIConstantsEx.au3> $drives = DriveGetDrive("CDROM") If Not @error Then CDTray("" & $drives[1], "open") $driveopen = $drives[1] Opt("GUIOnEventMode", 1) $mwin = GUICreate("CD Tray", 340, 80) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseIt") GUICtrlCreateLabel("CD Drive '" & $driveopen & "' is now open. Please place/remove disk and click OK.", 10, 10) $okb = GUICtrlCreateButton("OK", 125, 45, 80, 23) GUICtrlSetOnEvent($okb, "CloseIt") GUISetState(@SW_SHOW) EndIf While 1 Sleep(1000) WEnd Func CloseIt() CDTray("" & $drives[1], "close") Exit EndFunc Also here is the alias I use to make work with mIRC. pressing F5 in mIRC makes it launch the program. (After compiling above snippet, compile as CDTray.exe and place in the mIRC directory if you want to use it with your mIRC too.) alias F5 { run CDTray.exe } Simple, eh? Edited February 4, 2011 by N30N3M3S1S Link to comment Share on other sites More sharing options...
shai Posted February 8, 2011 Share Posted February 8, 2011 see _WinAPI_EjectMedia function in Link to comment Share on other sites More sharing options...
Skrip Posted February 10, 2011 Share Posted February 10, 2011 see _WinAPI_EjectMedia function in Uhh...why? [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
ReaImDown Posted February 11, 2011 Share Posted February 11, 2011 Rather than saying "good job" he's showing you the already completed coding that someone else did lol. Not bad for a first project. [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now