by_mehmet_emin Posted April 20, 2010 Share Posted April 20, 2010 Sorum basit CD Sürücüsü'nü çıkartmak ve takmak içinhangi kod gerekli. CD sürücüsünün açılması gereken kodu biliyorum; DrivesTB = Drive.Enumerate(); for nIndex, DrvLetter in DrivesTB do if Drive.GetType(DrvLetter) == 5 then Drive.Eject(DrvLetter); error = Application.GetLastError(); if (error ~= 0) then Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION); end end Ama kapatılması için gerekli kod nedir? Link to comment Share on other sites More sharing options...
MostWanted Posted April 20, 2010 Share Posted April 20, 2010 Autoit plugini kullanıyosan "AutoIt.CDTray(DrvLetter, AUTOIT_CD_CLOSE);" ile de cd sürücüsünü kapatabilirsin.Eğer autoit plugini yoksa http://www.tnctr.com/index.php?showtopic=136533[/CODE] burdan temin edebilirsin.. Link to comment Share on other sites More sharing options...
KintaRo Posted April 20, 2010 Share Posted April 20, 2010 İlla AMS ile yapmak istersen AMS'de kapatma kodu yok ama yardımcı bir DLL ile bunu yapabilirsin. Örnek şurda: http://www.tamotomatik.org/dosya/CDtray.rar[/CODE] Link to comment Share on other sites More sharing options...
spydevil Posted April 20, 2010 Share Posted April 20, 2010 Açmak için; DLL.CallFunction("winmm.dll", "mciSendStringA", "\"Set CDAudio Door Open\",0,0,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);[/CODE] Kapatmak için; [CODE]DLL.CallFunction("winmm.dll", "mciSendStringA", "\"Set CDAudio Door Closed\",0,0,0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);[/CODE] plugin veya dll kullanmana gerek yok .. Link to comment Share on other sites More sharing options...
casira Posted April 20, 2010 Share Posted April 20, 2010 AMS değilde AutoİT ile bir çalışma var çok basit. http://www.tnctr.com/index.php?showtopic=134258[/CODE] Link to comment Share on other sites More sharing options...
by_mehmet_emin Posted April 23, 2010 Author Share Posted April 23, 2010 Teşekkürler arkadaşlar internetim kesik olduğu için bakamadım. Ama verdiğiniz cevapların hepsini uyguladım şuan hepside çalışıyor.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.