Jump to content

ControlID issues


Recommended Posts

hey there.

I need some tips about how to get controlIDs from some windows (specially Norton360 and Logitech SetPoint). The Info tool only shows a blank id... why is that? Any way to bypass this issue?

My second question is about how to make the script work properly if the controlID is longer than the usual. Looks AutoIt dont know how to handle this IDs. What can I do to make it work?

Link to comment
Share on other sites

hey there.

I need some tips about how to get controlIDs from some windows (specially Norton360 and Logitech SetPoint). The Info tool only shows a blank id... why is that? Any way to bypass this issue?

ControlIDs are used by the standard windows APIs. Some applications are compiled to draw their own controls as graphics without using the Windows API to do it. AutoIt uses Windows APIs to access the controls, and so doesn't know how to access these "owner drawn" controls.

Flash is another example. You might see what look like buttons and input boxes in a flash window, but they are just pixels without Windows control IDs or control handles to use outside of the Flash application.

Try looking at the elements of a web page in IE with info tool. The whole browser client area is a single IEServer control, or something like that. The stuff you see inside is being drawn by the browser's code, not the Windows APIs.

My second question is about how to make the script work properly if the controlID is longer than the usual. Looks AutoIt dont know how to handle this IDs. What can I do to make it work?

Post an example of your "longer than the usual" ControlID. You might be looking at the class or ClassNameNN.

:huh2:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

So theres no way to access this non-Windows API IDs?

ID "longer than usual" example:

>>>> Control <<<<
Class:  WindowsForms10.COMBOBOX.app.0.378734a
Instance:   1
ClassnameNN:    WindowsForms10.COMBOBOX.app.0.378734a1
Name:   
Advanced (Class):   [CLASS:WindowsForms10.COMBOBOX.app.0.378734a; INSTANCE:1]
ID: 983942
Text:   
Position:   28, 83
Size:   242, 21
ControlClick Coords:    110, 9
Style:  0x56010243
ExStyle:    0x00000000
Handle: 0x00000000000F0386
Edited by Shaitan
Link to comment
Share on other sites

So theres no way to access this non-Windows API IDs?

Not really, the problem with .NET control IDs is the they are not static so will be different every time the application is run and possibly every time the form is displayed. You can use the class and instance to identify the control reasonably reliably. One thing to be aware of is that numbers on the end of the class will be different for each different build of the application so you will need to update your script whenever the application you are automating is updated.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

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...