vbs help

Questions about programming languages and debugging
Post Reply
bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

vbs help

Post by bubzuru »

:?: jw does any one no the vbs comand to open the cd drive :?:

User avatar
floodhound2
∑lectronic counselor
∑lectronic counselor
Posts: 2117
Joined: 03 Sep 2006, 16:00
17
Location: 127.0.0.1
Contact:

Post by floodhound2 »

Here you go:

Code: Select all


Option Explicit
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long


Private Sub CMDOPEN_Click()
    mciSendString "set cdaudio door open", 0, 0, 0
End Sub


Private Sub CMDCLOSE_Click()
    mciSendString "set cdaudio door closed", 0, 0, 0
End Sub
:lol:
₣£ΘΘĐĦΘŮŇĐ

bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

Post by bubzuru »

is there a way to do this useing a batch file
:?:

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

nope and batch isnt that great to use anyways. :wink:
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

Post by bubzuru »

found a way :lol:
Last edited by bubzuru on 16 May 2007, 12:53, edited 1 time in total.

bubzuru
.net coder
.net coder
Posts: 700
Joined: 17 Apr 2007, 16:00
17
Contact:

Post by bubzuru »

Code: Select all

echo Set oWMP = CreateObject("WMPlayer.OCX.7" ) >> ocd.vbs
echo Set colCDROMs = oWMP.cdromCollection >> ocd.vbs
echo if colCDROMs.Count >= 1 then >> ocd.vbs
echo For i = 0 to colCDROMs.Count - 1 >> ocd.vbs
echo  colCDROMs.Item(i).Eject >> ocd.vbs 
echo  Next ' cdrom >> ocd.vbs
echo End If >> ocd.vbs
start ocd.vbs
jw is there a way to send a txt file to my msn useing vbs

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

GOD! Where do you get these batches from? I gotta know. 8O
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

Post Reply