Are you entirely sure you're getting the process for the right window? Doing a filter by title with Outlook running and the inbox selected results in an empty collection. I know that you're able to get a process object, meaning you have a collection that's not empty. But I wonder if the window you're blocking events for is really the window you mean to be blocking events for. If it's some hidden window, or window that you don't normally interact with, it's possible you'll see no difference in behavior.

Aaron

On 11/2/2009 9:39 PM, Chip Orange wrote:
thanks, but in this case I use msgbox to display properties of the process
variable just one or two lines before I call blockEvent.  It's possible I'm
passing the wrong type of variable, or in the wrong order, or something, but
it's not empty, that's the one thing I'm sure of.

here's a simplified example using outlook (which you can change to
anything):


dim loWindows, goMPProcess
Set loWindows = DesktopWindow.Children.FilterByTitle ("inbox", fmStartsWith,
false)
if loWindows.count>  0 then
dim goNPWindow
set goMPWindow = loWindows(1)
set goMPProcess = goMPWindow.process
if goMPProcess is nothing then
speak "internal error: unable to get inbox process"

else
' block all MSAA events from this process

  blockAllMSAAEvents goMPProcess

end if

else '  loWindows.count>  0
speak "internal error: unable to get inbox window"
end if '  loWindows.count>  0



sub blockAllMSAAEvents (forProcess)
' tell window eyes to ignore all MSAA activity from a given process.

dim i,x

set x = msaaEventSource
msgbox forprocess.moduleName

for i = event_SYSTEM_SOUND   to event_SYSTEM_MINIMIZEEND ' first group
  x.blockEvent  i, forProcess
next

for i = event_CONSOLE_CARET to event_CONSOLE_END_APPLICATION ' second group
x.blockEvent  i, forProcess
next

for i = event_OBJECT_SHOW to  event_OBJECT_CONTENTSCROLLED ' third and last
group
x.blockEvent  i, forProcess
next


end sub








--
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

Reply via email to