Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB App references in VBS????

Status
Not open for further replies.

Smithsco

Technical User
Mar 30, 2003
89
AU
Is it possible to use a reference (such as MS speech object library) in VBscript?

What would I have to setup to make it useable?
 
I'm not exactly sure if you can - but what I do know you can do is that you can have an activex componment developed in VB that can be referenced by your vbscript - and tht activex component can have all the references that you want in it.

Hope it helps...
 
Have you tried the
Code:
WScript.CreateObject
method ?

Hope This Help
PH.
 
I haven't tried the create object method as I'm not enirelt sure what to call.

Hmm.. I think the activeX is a bit out of my league.
 
The short story is No, it doesn't. If you use Windows Script Components, you can use the <reference> element to include a type library, but that simply gets you access to the constants defined in the type library.

If you're goal is simply the constants (which I don't think it is), you can add them to a .h file, use the FileSystemObject to read it in, and the Execute/ExecuteGlobal statement to include them into the script. There's an example here of how to do that.

There may be script editors that allow you to set references to type libraries and then it would manipulate the code to VBS acting similar to VB. It wouldn't be that difficult, but I don't know of one off-hand.

FYI, if you download the MS Speech SDK, there's a DHTML example. It's in javascript, but it'll get you the ProgID's you're after.

Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top