This is the first time that i am trying to use event monitors...
I have an event monitor that keeps watching for window popups that occur in my target application. I want to use this to handle unexpected messages in the target application.
My whenever event works well but is currently triggered for both expected and unexpected messages.
My question is how do i get TP to differentiate between an expected window popup and an unexpected window popup?
To rephrase my question... is there a way to prevent TP from triggering the event when i am expected the popup?
Here goes the code...
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Dim monitor As TEventGroup
Dim condition As TWindowEvent
Set monitor = CreateTEventGroup("EventMonitor"
Set condition = WindowEvent("MsgPopUpEvent"
condition.AnyWindow = True
condition.AttachName = Window("PopUpMsgWindow" condition.AttachMode = tpAttachMode_ByAttachName
condition.WindowEventType = tpWindowEvent_Exists
monitor.Callback = "HandleMyUnexpectedPopUp"
SuspendScript </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
If you always do what you've always done, you will always get what you've always got!