dminion Posted January 27, 2006 Posted January 27, 2006 Does anyone know of a way to lock and unlock the cdrom drive tray using auto it? I've looked around and have only found ways to do it in VB. Can someone please help? Thanks, dminion
cdkid Posted January 27, 2006 Posted January 27, 2006 well this may not help but all i can think of is using a while loop and checking if it's open and if it is then close it... --probably being usless ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
kjactive Posted January 27, 2006 Posted January 27, 2006 (edited) Yes you just has to use the MS mesie player activex component like in this example... ; Author: Kåre Johansson ; AutoIt Version: 3.1.1.104 ; Description: Very Simple component example: Open and close all CDROM / DVD drives ; Date: 27 Jan 2006 $oRP = ObjCreate("WMPlayer.OCX") $cdroms = $oRP.cdromCollection With $cdroms; Object tag pool For $b = 1 To 10 If .Count > 0 Then For $a = 0 TO .Count - 1 .Item($a).Eject Next EndIf Sleep(3000) If .Count > 0 Then For $a = 0 TO .Count - 1 .Item($a).Eject Next EndIf Next EndWith $oRP = 0 Exit Simple as that... kjactive Edited January 27, 2006 by kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
dminion Posted January 27, 2006 Author Posted January 27, 2006 Yes you just has to use the MS mesie player activex component like in this example... ; Author: Kåre Johansson ; AutoIt Version: 3.1.1.104 ; Description: Very Simple component example: Open and close all CDROM / DVD drives ; Date: 27 Jan 2006 $oRP = ObjCreate("WMPlayer.OCX") $cdroms = $oRP.cdromCollection With $cdroms; Object tag pool For $b = 1 To 10 If .Count > 0 Then For $a = 0 TO .Count - 1 .Item($a).Eject Next EndIf Sleep(3000) If .Count > 0 Then For $a = 0 TO .Count - 1 .Item($a).Eject Next EndIf Next EndWith $oRP = 0 Exit Simple as that... kjactive I'm not sure I follow... how exactly will this lock the drive tray? It looks like it just opens and closes drive trays... Thanks, dminion
CyberSlug Posted January 27, 2006 Posted January 27, 2006 (edited) http://people.eku.edu/gumpp/AutoIt/cdtool.exe;Usage:Run("cdtool.exe Lock E:")Run("cdtool.exe Unlock E:")It doesn't do any input validation so make sure the drive letter is valid....Also, if you end up calling LOCK many times on the same drive, you will need to call UNLOCK that many times.... Edited January 27, 2006 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
SandelPerieanu Posted March 29, 2006 Posted March 29, 2006 http://people.eku.edu/gumpp/AutoIt/cdtool.exe;Usage:Run("cdtool.exe Lock E:")Run("cdtool.exe Unlock E:")It doesn't do any input validation so make sure the drive letter is valid....Also, if you end up calling LOCK many times on the same drive, you will need to call UNLOCK that many times.... cdtool.exe is au3 ?
Lakes Posted January 2, 2007 Posted January 2, 2007 Anyone with autoit source for this type of thing? I want to check if the drive is locked then unlock it. Thanks. 2015 - Still no flying cars, instead blankets with sleeves.
theguy0000 Posted January 2, 2007 Posted January 2, 2007 post some vb code that does exactly what you want, and we can probably convert it to autoit. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN
Lakes Posted January 2, 2007 Posted January 2, 2007 You mean search for VB code that does the same thing? I don`t have a clue when it comes to VB, sorry... 2015 - Still no flying cars, instead blankets with sleeves.
theguy0000 Posted January 2, 2007 Posted January 2, 2007 you said "I've looked around and have only found ways to do it in VB." So, show us what you have found, and we can probably convert it. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN
Lakes Posted January 2, 2007 Posted January 2, 2007 Huh?? This is what I posted... Anyone with autoit source for this type of thing?I want to check if the drive is locked then unlock it. 2015 - Still no flying cars, instead blankets with sleeves.
theguy0000 Posted January 2, 2007 Posted January 2, 2007 Huh?? This is what I posted... When I asked for VB code, it was directed at the OP, not you. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN
Lakes Posted January 2, 2007 Posted January 2, 2007 Ah, sorry... :"> 2015 - Still no flying cars, instead blankets with sleeves.
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