AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DriveGet, OutputVar, Cmd [, Value]

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Wed Mar 09, 2005 11:42 pm    Post subject: DriveGet, OutputVar, Cmd [, Value] Reply with quote

DriveGet, OutPutVar, StatusCD, %CdDrive%

is there any way when this returns open to determine wether its open or there is not a cd in the tray, not one or the other. Making a seperate return for each would be great. Thanks
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Thu Mar 10, 2005 12:58 am    Post subject: Reply with quote

Unfortunately I don't think so, at least not using the standard MCI method. There might be some lower level programming that could be done, but that is pretty far outside my experience.
Back to top
View user's profile Send private message Send e-mail
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Thu Mar 10, 2005 5:54 am    Post subject: Reply with quote

ahh chris its all good, I was just thinking if the tray were open when this following lable was run, it wouldnt work right but it does get the job done.
Code:
Eject:
If EStat = 0
{
   Drive, Eject, %DefaultDrive% , %EStat%
   EStat += 1
   Return
}
If Estat = 1
{
   Drive, Eject, %DefaultDrive% , %EStat%
   EStat -= 1
   Return
}
Return

_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Serenity



Joined: 07 Nov 2004
Posts: 1276

PostPosted: Thu Mar 10, 2005 9:27 am    Post subject: Reply with quote

With the following script I was able to get some commands you could use:

Code:
; display cd drive stats in a tooltip

cddrive = g:
#SingleInstance force
SetWinDelay, -1

Loop
{
   Sleep, 50
   DriveGet, cap, Capacity, %cddrive%
   DriveGet, status, StatusCD ; ,value
   DriveGet, label, Label, %cddrive%
   ToolTip, %cap% `n%status% `n%label%
}

/*
cap closed =
status closed = open
label closed =

cap open =
status open = open
label open =

cap disk = 0
status disk = stopped
label disk = Audio CD

get cap - useful only for finalized disks?
if there is a disk in the drive, its capacity will be 0, else nothing.
also, if there is a disk in the drive, it will have a label, else nothing.
*/

_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group