PDA

View Full Version : How to run OCX using VBscript?


janice_2k
06-10-2004, 07:48 AM
Dear gurus and members,
I am a newbie in VBscript. May I know how can I run .ocx using VBScript? Is there any sample codes or suggestions that I can refer? Will running .ocx using VBscript cause any security pop ups such as save/open dialog, activeX? Any suggestions and reference are highly appreciated. Hope to hear some reply soon.

Thanks in advance,
Janice

sage45
06-10-2004, 05:08 PM
Well, the most important thing is to ensure that the object control is registered in the registry... After you do that, you would set the variable and use CreateObject() to load the control for your use...

I.E. --

This example is using the REGOBL.DLL which is registered on the system using regsvr32.exe.

Dim objRegistry
Set objRegistry = CreateObject("RegObj.Registry")

After doing this, I can now manipulate this object control by making calls to it's internal functions... This file would be used to manipulate registery objects...

HTH,

-sage-

janice_2k
06-11-2004, 03:02 AM
Thanks sage45 for your reply and information.
I would like to know whether is it possible to use this object to record and save user's speech through microphone? Will saving the .wav file on user's computer will cause security and activeX pop ups? Is there any ways to skip these pop ups? How can this be done?
Any suggestions and ideas are highly appreciated. Hope to hear some reply soon.

Thanks in advance,
Janice

sage45
06-11-2004, 03:56 AM
I would like to know whether is it possible to use this object to record and save user's speech through microphone?If the object you wish to use supports this, then yes... Most authors will provide information about their OCX's/DLL's, including internal functions...
Will saving the .wav file on user's computer will cause security and activeX pop ups?More than likely it will... This is a security feature...Is there any ways to skip these pop ups?Unfortunately there is no way to stop the pop-up unless you were to write a dll that acted as a plug-in to the web browser... When the user installed the plug-in, ideally they would also consent to the system manipulation as provided in the script...

HTH,

-sage-