Re: Events from unregistered WSC?
- From: "James Whitlow" <jameswhitlow@xxxxxxxxxxx>
- Date: Sat, 18 Mar 2006 08:46:21 -0600
"mr_unreliable" <kindlyReplyToNewsgroup@xxxxxxxxxxx> wrote in message
news:uCvLSchSGHA.4740@xxxxxxxxxxxxxxxxxxxxxxx
hi James,
I have no trouble with that:
Set oWSC = GetObject("script:" & sComponentPath)
WScript.ConnectObject oWSC, sEventPrefix
Note, you may be getting thrown off the track by a documentation
error:
--- <doc> ---
Connects the object's event sources to functions with a given prefix.
object.ConnectObject(strObject, strPrefix)
Arguments
object WScript object.
strObject Required. String value indicating the name of the object
you want to connect.
strPrefix Required. String value indicating the function prefix.
--- </doc> ---
While it _says_ that strObject should be a string, that's wrong.
You should use the object itself for that parameter.
Thanks, jw, that worked well!
.
- References:
- Events from unregistered WSC?
- From: James Whitlow
- Re: Events from unregistered WSC?
- From: mr_unreliable
- Events from unregistered WSC?
- Prev by Date: Why GetStringValue return NULL?
- Next by Date: Re: WshController Error : The remote server machine does not exist or is unavailable
- Previous by thread: Re: Events from unregistered WSC?
- Next by thread: logon/logoff/startup/shutdown - only one works
- Index(es):
Relevant Pages
|