What Objects Are Scriptable? 
Author Message
 What Objects Are Scriptable?

I'm very new to WSH and COM and was surprised to find that I could use
WinSock in a VBScript.

In VBScript you perform a  WScript.CreateObject on"MSWinsock.Winsock".
I found this out only by seeing someone else's code.  The VB Object
Browser calls WinSock "MSWinSockLib"

I guess I have two questions:

How do you get a list of scriptable objects on your machine (NT 4)?

How do you enumerate a scriptable objects methods and properties?

Thanks,

Phil



Tue, 17 Sep 2002 03:00:00 GMT  
 What Objects Are Scriptable?
The method I use is OLEView.exe.

http://www.microsoft.com/com/resources/oleview.asp

It allows me to identify all objects on my local machine, their ProgID, AND their InProcServer32 filename. Armed with this filename info, I can use VB's Object Browser to load a reference to that DLL or OCX into a new Project, and see the Methods (then use the ProgID to create the object, and call it's Methods etc.)

If there is a more direct way to do this I would enjoy hearing it<g>

--
Mark L. Ferguson       Please reply in Newsgroup
marfers notes for OE 5.0  >  http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> I'm very new to WSH and COM and was surprised to find that I could use
> WinSock in a VBScript.

> In VBScript you perform a  WScript.CreateObject on"MSWinsock.Winsock".
> I found this out only by seeing someone else's code.  The VB Object
> Browser calls WinSock "MSWinSockLib"

> I guess I have two questions:

> How do you get a list of scriptable objects on your machine (NT 4)?

> How do you enumerate a scriptable objects methods and properties?

> Thanks,

> Phil



Tue, 17 Sep 2002 03:00:00 GMT  
 What Objects Are Scriptable?
Mark,

Thanks for the quick reply!  I downloaded OLEView and used it to look
at a few controls that I've already used just to get the feel for
things.  Now I feel like a kid at a toy store!

Phil

On Fri, 31 Mar 2000 17:42:40 -0800, "Mark L. Ferguson"

Quote:

>The method I use is OLEView.exe.

>http://www.microsoft.com/com/resources/oleview.asp

>It allows me to identify all objects on my local machine, their ProgID, AND their InProcServer32 filename. Armed with this filename info, I can use VB's Object Browser to load a reference to that DLL or OCX into a new Project, and see the Methods (then use the ProgID to create the object, and call it's Methods etc.)

>If there is a more direct way to do this I would enjoy hearing it<g>



Wed, 18 Sep 2002 03:00:00 GMT  
 What Objects Are Scriptable?
It isn't such simple to estimate whether objects are scripteable.
First you need to know which objects are registered. You can
use OLE/COM viewer from Microsoft (as Marc suggested).
Within this viewer you can get also the ProgID code of the object.

Then you need to know about the object's methods and properties.
Here you can use Object Browser (provided by MS Office Apps,
VC, VB etc.).

If you successful identity an object, there may be several hurdles
preventing you to script it. First of all, many objects provided from
ocx-files developed by Microsoft requires a licensing. For instance
WinSock.ocx won't run, if no MS Development environment is
installed. Same for Common Dialogs access and so on.

Then there is a question whether the component is visible. All visible
objects need a window for embedding. This is the reason why you
can't access many common controls from Microsoft or the Acrobat
Reader OCX. The trick you can use is: Embed the control into a
HTML page and use IE to view the page. Then you can control the
object trought the IE application object.

Have a look at the WSH Bazaar. There are several samples discussing
scripting other objects. Chapter 2 of the sneak preview discusses also
OLE/COM viewer, Object browser and more.

G. Born

Check out the WSH Bazaar at:

www.borncity.de

Phil Hill schrieb in Nachricht ...

Quote:
>I'm very new to WSH and COM and was surprised to find that I could use
>WinSock in a VBScript.

>In VBScript you perform a  WScript.CreateObject on"MSWinsock.Winsock".
>I found this out only by seeing someone else's code.  The VB Object
>Browser calls WinSock "MSWinSockLib"

>I guess I have two questions:

>How do you get a list of scriptable objects on your machine (NT 4)?

>How do you enumerate a scriptable objects methods and properties?

>Thanks,

>Phil



Wed, 18 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Making my own scriptable COM objects...

2. Recordset object, what am i doing wrong?

3. Chat Protocol Control v2 - Scriptable?

4. Scriptable commands for other programs

5. Are the properties of a DUN connection scriptable?

6. IIS scriptable?

7. Scriptable DB Error Handling

8. Is there a scriptable interface to IPSec settings?

9. In the search for all things scriptable

10. In the search for all things scriptable

11. IIS scriptable?

12. scriptable Backup

 

 
Powered by phpBB® Forum Software