Posts Tagged ‘Vbscript’

How Do I Loop My Vbscript?

Thursday, October 15th, 2009

For those of you who know VBScript, I want to know how to loop my VBScript. Here it is…
Set oWMP = CreateObject(“WMPlayer.OCX.7″ )
Set colCDROMs = oWMP.cdromCollection
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count – 1
colCDROMs.Item(i).Eject
Next ‘ cdrom
End If
Also, if anyone would like to share fun VBScripts with me, e-mail me.

How To Compile A Class Dll In Vb 2005 Express For Use From Vbscript?

Tuesday, October 13th, 2009

There are some things I need to do that VB Script cannot do, so I made a class with the calls and checked the “make visible to Com” flag. Trying to register the dll with regsvr gives me a “no entry point found” error, and trying to add it to component services gives me a “no components found” error.
I am at the end of my rope and have searched google groups, msdn, and just about everywhere else. There does not appear to be any document that explains it so that it actually works.