Jump to content

Contol ID is not Unique


soum
 Share

Recommended Posts

Hi All!

I am automating a GUI using Auto-it. I am using the AU3Info to for getting the controlID of the contorl. It is returning same control IDs for the for a redio button and a Button. I need to check the radio button. So I am used the ClassNameNN but it is failing to check that radio button some times. I tried using "Text", still it failes some times.

Can any one please tell how to go about it?

Thanks & Regards

Soum

Link to comment
Share on other sites

Hi All!

I am automating a GUI using Auto-it. I am using the AU3Info to for getting the controlID of the contorl. It is returning same control IDs for the for a redio button and a Button. I need to check the radio button. So I am used the ClassNameNN but it is failing to check that radio button some times. I tried using "Text", still it failes some times.

Can any one please tell how to go about it?

Thanks & Regards

Soum

If you need to check the state of the Radiobutton, use something llike:

This works:

If GUICtrlRead($button_1) = $GUI_Checked Then msgbox(0,"","")

Edited by Wb-FreeKill
Link to comment
Share on other sites

Hi All!

I am automating a GUI using Auto-it. I am using the AU3Info to for getting the controlID of the contorl. It is returning same control IDs for the for a redio button and a Button. I need to check the radio button. So I am used the ClassNameNN but it is failing to check that radio button some times. I tried using "Text", still it failes some times.

Can any one please tell how to go about it?

Thanks & Regards

Soum

I am not sure to understand you are saying GUICtrlCreateRadio and GUICtrlCreateButton are returning the same ID.

Your script must be wrong you certainly GUICtrlDelete one of them and the next creation reallocate the same id.

It is more easy to help you if you post reproduction sample script. ;)

Link to comment
Share on other sites

you are saying GUICtrlCreateRadio and GUICtrlCreateButton are returning the same ID.

Is he automating someone else's program or his own? I've seen some commercial software where controls were on top of each other and just made visible and invisible as needed. This causes AutoIT info to "see" both controls at the same time, but only one predominates. Perhaps he can test this by using ControlMove and see if he can now hover over the second control without interference from the first. Just a long shot...
...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
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...