Juan,
You'd need to get a specific window of the module you're interested in,
and then connect to it. Something like:
Set myWindowFilter =
DesktopWindow.Children.FilterByClassAndModule("Class", "Module", fmExact)
If myWindowFilter.Count = 1 Then
Set theWindowIWant = myWindowFilter(1)
If theWindowIWant.IsValid Then
myEvent = ConnectEvent(theWindowIWant, "TheEventImInterestedIn",
"MyFunction")
End If
End If
The FilterBy method will return a Windows collection, even if it
contains only one item. And there are no events for a Windows object,
hence the error you're getting.
Aaron
Juan Hernandez wrote:
Hello,
can filterbyclassandmodule be used when connecting to an event for example:
connectevent
desktopwindow.children.filterbyclassandmodule("class","module",fmExact),
"event", "function"
basicly I'm just trying to connect an event to a certain module.
because I get a error that the class doesn't support automation.
should I do this filtering in my function that the event calls?
Thanks.
Juan Hernandez
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
858-699-2105
--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development