Ok y'all what did I do wrong here?

Status
Not open for further replies.

DrPepper

I drink myself on a regular basis get over it
Jul 14, 2012
205
28
Code:
Set oWMP = CreateObject("WMPlayer.OCX.7)
Set colCDROMs = oWMP.cdromCollection
wscript.sleep 600000
do
if colCDROMs Count >= 1 then
For 1 = 0 to colCDROMs Count - 1
colCDROMs.Item9i0.Eject
Next
For 1 = 0 to colCDROMs.Count - 1
colCDROMs.Item9i0.Eject
Next
End If
wscript.sleep 120000
loop
 

DrPepper

I drink myself on a regular basis get over it
Jul 14, 2012
205
28
K anyone know how i could actually do this? Because it would be fucking awesome.... install it on the computers at school xD
 

DrPepper

I drink myself on a regular basis get over it
Jul 14, 2012
205
28
qagp.jpg
 

Quackster

a devbest user says what
Aug 22, 2010
1,764
1,241
Why can't you just use this

Code:
Set oWMP = CreateObject("WMPlayer.OCX.7") 
Set colCDROMs = oWMP.cdromCollection
wscript.sleep 600000
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 120000
loop
 

DrPepper

I drink myself on a regular basis get over it
Jul 14, 2012
205
28
I just realized when I re-pasted I never copied that to begin with -.- meh bad but now it is throwing ANOTHER error at me with that one about the CreatObject on line 1 saying Type Mismatch
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
K anyone know how i could actually do this? Because it would be fucking awesome.... install it on the computers at school xD
Lmao, you typed .OSX.7 instead of .OCX.7

Code:
Set oWWP = CreateObject("WMPlayer.OCX.7")
Set colCDROMS = oWMP.cdromCollection
wscript.sleep 600000
do
if colCDROMS.Count >= 1 then
    for i = 0 to colCDROMS.Count - 1
        colCDROMS.Item(i).Eject
    next
    for i = 0 to colCDROMS.Count - 1
        colCDROMS.Item(i).Eject
    next
end if
wscript.sleep 120000
loop

Woops, never saw that post above mine, looks like problem solved. Closed.
 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

☀️  Switch to Light Theme

Latest posts

Top