Hi: Connecting to the Desktop did get things at least firing.

The Overlap Window OnChildFocus first hits the Desktop, then the Visual
Studio Start Page and again the Desktop.

I pull a a Accessible object when the Visual Studio window is the overlap
for future analysis.

Now I will see if MSAA offers me anything using the Accessible Object? Does
that sound right?

Here is the output for the 3 OnChildFocus events and below it my code:

Now I could use some comments on what to try next to ensure things are
working...

 

This has 2 sections so you can jump to a heading by find on "Section:

It is really quite short but thought I would set up in case gets longer in
the future.

 

Section: Logger Output

Desktop OnChildFocus fired

OverlapWindow Properties:

Title: desk top

Name: Program Manager

ModuleName: SHELL32

ClassName: Progman

IsValid: True

Status: 2

Visible: True

overlapWindow Was not set to overlapObj

Desktop OnChildFocus fired

OverlapWindow Properties:

Title: Start Page - Microsoft Visual Studio

Name: Error List - Microsoft Visual S

ModuleName: DEVENV

ClassName: HwndWrapper[DefaultDomain;;b2b0d600-6857-4bfe-8b10-1dfaf378

IsValid: True

Status: 1

Visible: True

accOverlap Accessible is set for overlapObj

Desktop OnChildFocus fired

OverlapWindow Properties:

Title: desk top

Name: Program Manager

ModuleName: SHELL32

ClassName: Progman

IsValid: True

Status: 2

Visible: True

overlapWindow Was not set to overlapObj

 

Section: AppCode

' VS2013

Option Explicit

Dim logFSO: Set logFSO = CreateObject("Scripting.FileSystemObject")

Dim myMSAAEventSource : Set myMSAAEventSource = MSAAEventSource

myMSAAEventSource.Process = ClientInformation.ApplicationProcess

Dim accOverlap

 

Dim Desktop

Set Desktop = ClientInformation.Application.DesktopWindow

ConnectEvent Desktop, "OnChildFocus", "OnChildFocus"

Sub OnChildFocus( wObj)

Logger( "Desktop OnChildFocus fired")

Dim overlapObj

Set overlapObj = wObj.Overlap

Logger( "OverlapWindow Properties:")

Logger( "Title: " & overlapObj.Title)

Logger( "Name: " & overlapObj.Name)

Logger( "ModuleName: " & overlapObj.ModuleName)

Logger( "ClassName: " & overlapObj.ClassName)

Logger( "IsValid: " & overlapObj.IsValid)

Logger( "Status: " & overlapObj.Status)

Logger( "Visible: " & overlapObj.Visible)

If (overlapObj.IsValid) And _

(overlapObj.ModuleName = "DEVENV") Then

Set accOverlap = overlapObj.Accessible

Logger( "accOverlap Accessible is set for overlapObj")

Else

Logger( "overlapWindow Was not set to overlapObj")

End If

End Sub

 

Sub Logger( LogLine )

Const ForAppend = 8

Dim LogFile: Set LogFile = logFSO.OpenTextFile(
"c:\VSScriptFolder\Logger.txt", ForAppend, True)

LogFile.WriteLine(LogLine ) 

LogFile.Close

End Sub

' EndOfFile:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com/attachments/20150322/15b31f66/attachment.htm>
_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com

Reply via email to