Hi: below is the details for the ClientInformation.Overlap window and the
WEEvent lines related to this only window that gets focus when visual studio
is opened.
While some properties match others do not match.
the details for the class dont.
Is this normally the case and how does the event handler for the
OnChildFocus event handler choose whether to fire the event handler?
I am out of ideas since I dont know how the WE scripting engine connects and
associates a window event to an Event Handler - what properties it matches
up.
I cant make a simpler script and I cant even get this working, sigh.
Here is The Overlap Window from ClientInformation.Overlap
Title:
Name: HwndWrapper[DefaultDomain;;8f01
ModuleName: DEVENV
ClassName: HwndWrapper[DefaultDomain;;8f01625d-778f-43c0-b8b6-d3c550b0
Handle: 2557536
Style: 79691776
IsValid: True
Status: 2
Type: 1
Visible: False
Here are A handful of the relevant lines from WEEvent:
381 Window.OnChildActivate, Handle = 1505C0, Module Name = DEVENV, Class
Name = HwndWrapper[DefaultDomain;;d597542b-6b14-4c90-8131-f68f3f4c, Title =
Start Page - Microsoft Visual Studio
382 Window.OnChildClose, Handle = 2754024
383 Window.OnChildClose, Handle = 3736560
384 Window.OnChildFocus, Handle = 1505C0, Module Name = DEVENV, Class Name =
HwndWrapper[DefaultDomain;;d597542b-6b14-4c90-8131-f68f3f4c, Title = Start
Page - Microsoft Visual Studio
385 Window.OnChildSummary, Handle = 1505C0, Module Name = DEVENV, Class Name
= HwndWrapper[DefaultDomain;;d597542b-6b14-4c90-8131-f68f3f4c, Title = Start
Page - Microsoft Visual Studio
...
My Full Script:
' VS2013
Option Explicit
Dim logFSO: Set logFSO = CreateObject("Scripting.FileSystemObject")
Dim windowOverlap
Set windowOverlap =ClientInformation.Overlap
Logger( "Title: " & windowOverlap.Title)
Logger( "Name: " & windowOverlap.Name)
Logger( "ModuleName: " & windowOverlap.ModuleName)
Logger( "ClassName: " & windowOverlap.ClassName)
Logger( "Handle: " & windowOverlap.Handle)
Logger( "Style: " & windowOverlap.Style)
Logger( "IsValid: " & windowOverlap.IsValid)
Logger( "Status: " & windowOverlap.Status)
Logger( "Type: " & windowOverlap.Type)
Logger( "Visible: " & windowOverlap.Visible)
' Make a copy of the MSAAEventSource object, and filter it by the Studio
process
Dim myMSAAEventSource : Set myMSAAEventSource = MSAAEventSource
myMSAAEventSource.Process = ClientInformation.ApplicationProcess
' Logger( "myMSAAEventSource.Process =
ClientInformation.ApplicationProcess")
' Logger( ClientInformation.ApplicationProcess.ModuleName & " ModuleName")
' Logger(ClientInformation.ApplicationProcess.FileVersion & " FileVersion")
' Logger(ClientInformation.ApplicationProcess.InternalName & "
InternalName")
' Logger( ClientInformation.ApplicationProcess.ProductName & " ProductName")
' Logger( ClientInformation.ApplicationProcess.ProductVersion & "
ProductVersion")
ConnectEvent windowOverlap, "OnChildFocus", "OnChildFocus"
Sub OnChildFocus( windowOverlap )
Logger( "OnChildFocus fired")
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/20150321/cdfb6b80/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