Instancing ActiveX controls within WSH Scripts 
Author Message
 Instancing ActiveX controls within WSH Scripts

Using VBScript to create instances of ActiveX controls within HTML
pages requires the <object> tags, but how is this represented within a
WSH Script?

I've assume from an example I've seen ("set SendKeys =
CreateObject("SKey.SKeys")) that CreateObject is the method used, but
how do you find what string to pass to it?



Sat, 05 May 2001 03:00:00 GMT  
 Instancing ActiveX controls within WSH Scripts
Use the OLE Viewer (comes with Visual Studio or download it from MS)
Find it here http://www.microsoft.com/com/resource/oleview.asp
Regards,
Ian
WSH FAQ http://wsh.glazier.co.nz/frame.htm
Quote:

>Using VBScript to create instances of ActiveX controls within HTML
>pages requires the <object> tags, but how is this represented within a
>WSH Script?

>I've assume from an example I've seen ("set SendKeys =
>CreateObject("SKey.SKeys")) that CreateObject is the method used, but
>how do you find what string to pass to it?



Tue, 08 May 2001 03:00:00 GMT  
 Instancing ActiveX controls within WSH Scripts
On Fri, 20 Nov 1998 13:02:55 +1300, "Ian Morrish"

Quote:

>Use the OLE Viewer (comes with Visual Studio or download it from MS)
>Find it here http://www.microsoft.com/com/resource/oleview.asp
>Regards,
>Ian
>WSH FAQ http://wsh.glazier.co.nz/frame.htm


>>Using VBScript to create instances of ActiveX controls within HTML
>>pages requires the <object> tags, but how is this represented within a
>>WSH Script?

>>I've assume from an example I've seen ("set SendKeys =
>>CreateObject("SKey.SKeys")) that CreateObject is the method used, but
>>how do you find what string to pass to it?

I assume that within OLEView the "ProgID" field contains the string I
am after.Should all of these active X contols be scriptable through
WSH? CreateObject() seems to fail on some of them. I'm trying to
initialise the Speech Recognition Active X controls from Microsoft's
Speech SDK with no success. I can initialise it in an HTML document no
problem with :

<object NAME="ActiveVoice" TYPE="application/x-oleobject"
   classid="clsid:EEE78591-FE22-11D0-8BEF-0060081841DE"
   HEIGHT=120
   WIDTH=135

but working out how to do it in a WSH script still escapes me, even
after trying a CreateObject(DirectSS.DirectSS.1).

Thanks Ian for the web address - I found heaps of useful info there.



Sun, 13 May 2001 03:00:00 GMT  
 Instancing ActiveX controls within WSH Scripts
Great minds think alike.
I had also started playing with the speach SDK (but had to rebuild my PC &
havn't reloaded the SDK yet). See http://research.microsoft.com/srg/

This is where I got to...

'type of speech
VTXTST_STATEMENT=1
VTXTST_QUESTION=2
VTXTST_COMMAND=4
VTXTST_WARNING=8
VTXTST_READING=10
VTXTST_NUMBERS=20
VTXTST_SPREADSHEET=40

'priorities
VTXTSP_VERYHIGH=80
VTXTSP_HIGH=100
VTXTSP_NORMAL=200

Set oVoice = Wscript.CreateObject("VTxtAuto.VTxtAuto")
oVoice.Speak "This is a test of text to speach"
Wscript.echo "done", VTXTST_COMMAND

Quote:

>On Fri, 20 Nov 1998 13:02:55 +1300, "Ian Morrish"

>>Use the OLE Viewer (comes with Visual Studio or download it from MS)
>>Find it here http://www.microsoft.com/com/resource/oleview.asp
>>Regards,
>>Ian
>>WSH FAQ http://wsh.glazier.co.nz/frame.htm


>>>Using VBScript to create instances of ActiveX controls within HTML
>>>pages requires the <object> tags, but how is this represented within a
>>>WSH Script?

>>>I've assume from an example I've seen ("set SendKeys =
>>>CreateObject("SKey.SKeys")) that CreateObject is the method used, but
>>>how do you find what string to pass to it?

>I assume that within OLEView the "ProgID" field contains the string I
>am after.Should all of these active X contols be scriptable through
>WSH? CreateObject() seems to fail on some of them. I'm trying to
>initialise the Speech Recognition Active X controls from Microsoft's
>Speech SDK with no success. I can initialise it in an HTML document no
>problem with :

><object NAME="ActiveVoice" TYPE="application/x-oleobject"
>   classid="clsid:EEE78591-FE22-11D0-8BEF-0060081841DE"
>   HEIGHT=120
>   WIDTH=135

>but working out how to do it in a WSH script still escapes me, even
>after trying a CreateObject(DirectSS.DirectSS.1).

>Thanks Ian for the web address - I found heaps of useful info there.



Mon, 14 May 2001 03:00:00 GMT  
 Instancing ActiveX controls within WSH Scripts
Finally got it all working
It seems like there is a minor installation bug with the Microsoft
Speech SDK that doesn't register the ActiveX control "friendly names"
properly. After manually creating entries that map the Class ID's to
things such as "Vtext.Vtext.1", the CreateObject() calls work
properly.


Mon, 14 May 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Instancing an Activex Control

2. Referencing ActiveX Control within html form tag

3. Using an ActiveX control within MSG.WSC

4. pb with a msg box while executing activeX control within a page

5. ActiveX Control Container for VBCCE5 ActiveX Controls!?

6. Control for editing ini files from within WSH

7. adding an activex control to Wsh

8. ActiveX Controls from VBScript or WSH

9. ActiveX control in WSH without HTML?

10. Debug an ActiveX Control called from WSH

11. Design Philosophy for WSH-extending ActiveX controls

12. How to use Script Control from within a C Prog

 

 
Powered by phpBB® Forum Software