Thanks Chip, and one question at bottom: Got that from your class.
When the Immediate Window opens it says it can not be moved or Resized. I
have checked the Mouse, Active andFocus Window checkBoxes at various times
with no good results.
Today I am using UISpy to determine if the necessary information is
available in the Managed Code Framework version of the UIA DLL(s).
It appears I can get the controls inside the Forms Designer in vb.net 2010
with property details as was presented via the MSAA Hooked report from the
Inspect Tool.
Now, I have to see if I can find the window that has the 5 children (the 5
controls on the Forms Designer).
If I can find that perhaps I can get the controls from UIA, build an array
to use to pass information to WE and react to left or right mouse clicks
accordingly as well.
The trick will be that vb.net uses overlays, adorn windows and allot of
panes and frames to build the Forms Designer so it may take time to evaluate
and may, or not, be available depending on if I can get at it with an ID,
Name or something (UIA Something not a WE Something).
Since focus (we focus?) is not on the particular pane or frame which defines
the 5 children I am not sure I can use MSAA to get at that particular window
but might be able to get at it programatically with some type of walker,
bad - too slow, and with a query if I can identify the control well enough.
Well, back to more testing to see where that pane, frame, window or whatever
is which defines the 5 child objects inside the Forms Designer - sigh.
One question, the Microsoft Guru with the native com version of the uia dll
said he had never worked with vbs but has worked with vb.net and c# and
thinks that a vbs script may require a "wrapper" to access the native COM
DLL but wasnt sure.
Does VBS use wrappers of some sort when it accesses other native COM Dlls?
Later:
Rick USA
----- Original Message -----
From: "Chip Orange" <[email protected]>
To: <[email protected]>
Sent: Wednesday, May 02, 2012 9:12 PM
Subject: RE: Need WE Immediate App useage Help
One other issue Rick, when you're trying to work with items under the
mouse
and you bring up the Immed window, it may cover just the item which the
mouse was over (preventing you from using commands involving the
mouse.window or mouse.position); so to get around this, under the Immed's
View menu, it has choices which cause it to try and resize and reposition
it's window so it doesn't block what you need to work with. In this case
you will want to choose the choice which tells it to "resize mouse
window",
then close the Immed window (it will remember this setting), position your
mouse, and try reopening the Immed app. If it cannot find a place to
exist
which doesn't block the item the mouse is over, you'll hear a warning
spoken
that it failed to open as you desired.
hth,
Chip
-----Original Message-----
From: RicksPlace [mailto:[email protected]]
Sent: Wednesday, May 02, 2012 12:20 PM
To: [email protected]
Subject: Re: Need WE Immediate App useage Help
Hi and thanks Steve:
I tried:
Print Mouse.Window.Accessible.Description but got a blank
line in response.
I then did:
print Mouse.Window.Accessible.Name and got:
AdornerWindow
This is not the Button that the Mouse is positioned on.
I did get the message when opening the WE Immediate App that
it could not be Resized or Moved - not sure why.
But, all commands seem to return correct values for other
controls not inside the Forms Designer.
It looks like WE thinks the mouse is on the other window even
though it is reading the jumbled clips which do include the
text of the button names but jumbled up and all at the same time.
I know the information is there under the Caret (system
caret) since it is reported in the MSAA Mode using the
Inspect tool so there should be some way of getting at it - I
just cant seem to figure it out.
If you have another idea or even if you have an idea why the
Imediate Mode window cant be moved or ReSized let me know.
I have been beating my head against this using UISpy,
AccEvent, a couple of other MS tools and a few WE Tools but
cant get a grip on what to do to get at the description.
Perhaps in a script but I would rather do it first in the
Immediate App before wasting allot of time trying to create a
script blindly.
If you dont have any ideas I will go back into the WE tools
and see if I can find anything first but I had no luck before
when trying to find the Text Property of the button or other
controls on the Forms Designer.
Rick USA
----- Original Message -----
From: "Stephen Clower" <[email protected]>
To: <[email protected]>
Sent: Wednesday, May 02, 2012 12:00 PM
Subject: Re: Need WE Immediate App useage Help
> Rick,
>
> Try
> print Mouse.Window.Accessible.Description
>
> Regards,
> Steve
>
>
>
> On 5/2/2012 11:51 AM, RicksPlace wrote:
> > Hi:
> > I am working with VB.net 2010 Express, the WindowEyes
Immediate App
> and the Microsoft Inspect.exe tools.
> > In Vb.net I have a form called Form1:
> > I opened the Forms Designer and dropped some controls on it.
> > Later, I went back into vb.net and brought up the forms designer
> > with
> Form1 loaded.
> > I moved the Mous over one of the controls - a button I
had dropped
> > on
> the design earlier.
> > Windoweyes read the clips which are jumbled up.
> > I fired up Inspect.exe and all the information was presented
> correctly for the MSAA option.
> > Below is the information from Inspect.exe.
> > My question is:
> > What Print Command would I use in the WindowEyes Immediate App to
> > get
> the Description Property for the Button under the Mouse?
> > The text in the Description Property in Inspect.exe is the correct
> information in the Text Property for that button.
> > So, I am trying to read this Property using WindowEyes
Immediate App
> so I can present the correct text instead of the jumbled clips
> currently read.
> > I found the description property in the Accessible Object but
> couldn't figure out how to get to it for the button in the
WindowEyes
> Immediate App.
> > Any idea of what print statement to use?
> > Like:
> > Print Mouse.something.something.Description (I have tried using
> Accessible in the path with no luck so far).
> > Do I have to execute a PreFetch or something?
> > Here is a printout from the Inspect.exe tool set to
record the MSAA
> Information for a button control I dropped on the Form
Designer of the
> vb.net 2010 Express program.
> > The form name is Form1.
> > <BeginOutput>
> > How found: Mouse move (75,772)
> > hwnd=0x00020338 32bit
> class="WindowsForms10.Window.8.app.0.34f5582_r39_ad1"
style=0x50010000
> ex=0x20
> > ChildId: 0
> > Interfaces: IEnumVARIANT IOleWindow
> > Impl: Remote native IAccessible
> > Name: "Button1"
> > Value: [null]
> > Role: push button (0x2B)
> > State: focusable (0x100000)
> > Location: {l:71, t:770, w:75, h:23}
> > Selection:
> > Description: "This is the first button"
> > Kbshortcut: [null]
> > DefAction: ""
> > Help: [null]
> > HelpTopic: ""
> > ChildCount: 0
> > Window: 0x2033E
> > FirstChild: [null]
> > LastChild: [null]
> > Next: [null]
> > Previous: [null]
> > Left: [null]
> > Up: [null]
> > Right: [null]
> > Down: [null]
> > Other Props: Object has no additional properties
> > Children: Container has no children
> > Ancestors: "Button1" : window : focusable
> > "Form1" : client : selected,focused,focusable
> > "Form1" : window : sizeable,moveable,focusable
> > "OverlayControl" : client : focusable
> > "OverlayControl" : window : focusable
> > "DesignerFrame" : client : focused,focusable
> > "DesignerFrame" : window : focused,focusable
> > none : client : focusable
> > none : window : focusable
> > "Form1.vb [Design]" : client : focusable
> > "" : pane : focusable
> > "Form1.vb [Design]" : pane : focusable
> > "Form1.vb [Design]" : page tab : selected,focusable,selectable
> > "" : page tab list : focusable
> > "" : pane : focusable
> > "WindowsApplication1 - Microsoft Visual Basic 2010 Express" :
> window : focusable
> > "Form1.vb [Design]" : window : focusable
> > "WindowsApplication1 - Microsoft Visual Basic 2010 Express" :
> window : focusable
> > "WindowsApplication1 - Microsoft Visual Basic 2010 Express" :
> window : sizeable,moveable,focusable
> > "Desktop" : client : focusable
> > "Desktop" : window : focusable
> > [ No Parent ]
> > <EndOfOutput>
> > Thanks:
> > Rick USA
>
> --
> Stephen Clower
> Product support specialist & App Development GW Micro, Inc. * 725
> Airport North Office Park, Fort Wayne, IN 46825
> 260-489-3671 * gwmicro.com
>