Jump to content

Trouble getting ControlID


KHCCData
 Share

Recommended Posts

My company has just updated its database and I need to transfer client information into the new database (ChildPlus.net, a thin client app), and have been trying to automate data entry. And failing.

It seemed like AutoIt should work for what I need, but instances and handles for fields change between records, and it doesn’t seem to respond properly to the name of the control either. I have most of the data in csv or excel files, it’s just that controlsend/click do not attach to the fields. I don’t see a way besides instance and class(nn) as names aren’t working.

I cannot just save mouse positions as the text reflow works against it, and there are not enough key commands to be able to script it easily.

The field has two distinct areas, the outer one has a .net name, and the inner just has class and instance(the instance changes if other menu commands are selected, and the class is the same for every field in the application). I can use ControlGetText("ChildPlus.net","","[CLASS:WindowsForms10.EDIT.app.0.3c47a4f_r17_ad1; INSTANCE:24]") for the inner field, but just the first time as the instance changes once I've clicked something else. ControlGetText("ChildPlus.net","","[NAME:txtAlternateID]") produces nothing.

Outer field:

>>>> Window <<<<
Title:    ChildPlus.net
Class:    WindowsForms10.Window.8.app.0.3c47a4f_r17_ad1
Position:    -8, -8
Size:    1616, 876
Style:    0x17CF0000
ExStyle:    0x00050100
Handle:    0x00000000000104EC

>>>> Control <<<<
Class:    WindowsForms10.Window.b.app.0.3c47a4f_r17_ad1
Instance:    234
ClassnameNN:    WindowsForms10.Window.b.app.0.3c47a4f_r17_ad1234
Name:    txtAlternateID
Advanced (Class):    [NAME:txtAlternateID]
ID:    855648
Text:    
Position:    945, 575
Size:    285, 28
ControlClick Coords:    133, 2
Style:    0x56000000
ExStyle:    0x00010000
Handle:    0x00000000000D0E60

>>>> Mouse <<<<
Position:    1078, 599
Cursor ID:    0
Color:    0x000000

 

Inner Field:

>>>> Window <<<<
Title:    ChildPlus.net
Class:    WindowsForms10.Window.8.app.0.3c47a4f_r17_ad1
Position:    -8, -8
Size:    1616, 876
Style:    0x17CF0000
ExStyle:    0x00050100
Handle:    0x00000000000104EC

>>>> Control <<<<
Class:    WindowsForms10.EDIT.app.0.3c47a4f_r17_ad1
Instance:    24
ClassnameNN:    WindowsForms10.EDIT.app.0.3c47a4f_r17_ad124
Name:    
Advanced (Class):    [CLASS:WindowsForms10.EDIT.app.0.3c47a4f_r17_ad1; INSTANCE:24]
ID:    1443764
Text:    
Position:    950, 579
Size:    275, 20
ControlClick Coords:    71, 12
Style:    0x560100C0
ExStyle:    0x00000000
Handle:    0x00000000001607B4

>>>> Mouse <<<<
Position:    1021, 613
Cursor ID:    0
Color:    0xFFFFFF

 

Link to comment
Share on other sites

Here for instance is a sample client id field I am trying to get text from. The outer control is named and that would be best IF i could use it, but it's only the inner control that holds text. And the instance and control ID change for that inner box.
Is there a way to get CLASSNN for the control contained inside [NAME:txtAlternateID] ?

 

 

double boxed control.jpg

Edited by KHCCData
picture shown in preview, but not in post
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...