S
Steve
I hope this is an appropriate group to post this question. If it is
not I would appreciate someone pointing out a more appriate group.
I hope someone can help me with this as I have been fighting this
issue for several days now.
I am writing an app which will automate some tedious manual work have
to do in my job. The way the solution will work is to basically
execute another application (third party commercial software package)
then perform actions (ie button pushes, menu item selections etc.) on
the UI elements of the newly started application. I have this
solution working for the most part utilizing MSAA to get references to
and manipulate the various UI elements of the applcation. However I
have one problem I have not been able to solve. This problem involves
what looks like a listview or grid control (although the class name
returned by Spy++ is WindowsForms10.Window.8.app3). What I am trying
to do is to step through the items (rows) in this grid/listview,
selecting the row, reading the text out of the first column then click
a button on the same parent as the grid/listview. Doing this sequence
of actions should cause the other app to open the selected document in
it's main window. As I said this is working for the most part. The
only problem I am having is the select of the item (row) which means
when I "click" the button I am always open the first document
(selected by default when the window opens) in the list. I can
correctly get the collection IAccessible objects referencing the rows
of the grid/listview and loop through that collection returning the
text in the first column of each. However when I attempt to force a
row to be selected...nothing hapens.
Ok there is what I am trying to do and the problem I am having now
here is the code I am using.
// Get the list of row items from the project list
grid
Rows = ProjectList.GetChildren
(AccessibleUIItemType.Row);
// Get the number of items in the list
numProjects = Rows.Count();
// Get the Row item associated with curProject
MSAAUIItem Row = Rows[curProject];
// Make sure this is the selected row
Row.Select(SelFlags.TAKEFOCUS |
SelFlags.TAKESELECTION);
// The statement above seems to have no effect
// Get the project name. This will be the name of the
rows first child
ProjectName = Row.Properties.Name;
All of the above statements except the Row.Select statement do excatly
what I would expect.
Can anyone shed some light on what I might be doing wrong here.
I also have a somewhat different (but related) question, why are none
of the windows in this application I am trying to automate "normal"
windows? They all seem to have this wierd "WindowsForms10.Window.
8.app3" (or something similar) class where I would have expected
"SysListView32".
Thanks in advance for any help
Steve
not I would appreciate someone pointing out a more appriate group.
I hope someone can help me with this as I have been fighting this
issue for several days now.
I am writing an app which will automate some tedious manual work have
to do in my job. The way the solution will work is to basically
execute another application (third party commercial software package)
then perform actions (ie button pushes, menu item selections etc.) on
the UI elements of the newly started application. I have this
solution working for the most part utilizing MSAA to get references to
and manipulate the various UI elements of the applcation. However I
have one problem I have not been able to solve. This problem involves
what looks like a listview or grid control (although the class name
returned by Spy++ is WindowsForms10.Window.8.app3). What I am trying
to do is to step through the items (rows) in this grid/listview,
selecting the row, reading the text out of the first column then click
a button on the same parent as the grid/listview. Doing this sequence
of actions should cause the other app to open the selected document in
it's main window. As I said this is working for the most part. The
only problem I am having is the select of the item (row) which means
when I "click" the button I am always open the first document
(selected by default when the window opens) in the list. I can
correctly get the collection IAccessible objects referencing the rows
of the grid/listview and loop through that collection returning the
text in the first column of each. However when I attempt to force a
row to be selected...nothing hapens.
Ok there is what I am trying to do and the problem I am having now
here is the code I am using.
// Get the list of row items from the project list
grid
Rows = ProjectList.GetChildren
(AccessibleUIItemType.Row);
// Get the number of items in the list
numProjects = Rows.Count();
// Get the Row item associated with curProject
MSAAUIItem Row = Rows[curProject];
// Make sure this is the selected row
Row.Select(SelFlags.TAKEFOCUS |
SelFlags.TAKESELECTION);
// The statement above seems to have no effect
// Get the project name. This will be the name of the
rows first child
ProjectName = Row.Properties.Name;
All of the above statements except the Row.Select statement do excatly
what I would expect.
Can anyone shed some light on what I might be doing wrong here.
I also have a somewhat different (but related) question, why are none
of the windows in this application I am trying to automate "normal"
windows? They all seem to have this wierd "WindowsForms10.Window.
8.app3" (or something similar) class where I would have expected
"SysListView32".
Thanks in advance for any help
Steve