Jump to content

Two buttons in window with no unique Control ID?


Recommended Posts

Hi -- hope there is an easy fix that I am overlooking.

There is a column of three buttons within a window -- 'Request', 'Notice' and 'Query' -- but the first two share a 'button6' id in the windowinfo tool and I am unsure how to point to them uniquely.  The third ('Query') is 'button8'.  Is there a way to uniquely identify 'button6' and 'button7' if no differences appear in windowinfo? I tried to click on 'button6' and the implied 'button7' using a script that works successfully with 'button8' but it does not work.

Is there a way -- besides using mouseclick and coordinates? -- to click on these buttons?  Attached are some photos that show the windowinfo and buttons.  They are not that useful.  Capture1 shows the 'Query' button info and 'Capture2' is what I see when I hover over both 'Request' and "Notice'.

Thanks for the help..

Capture1.JPG

Capture2.JPG

Edited by aaddaamm
typo.
Link to comment
Share on other sites

That text comes from the Group control, and not the radio buttons.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I will look and play around some more.  I am doing something wrong since I cannot get my script to click on button8 using the method you say, despite trying winactivate, etc.  I tried switching instance/text around as I saw in another post, but

ControlClick("E-Locate", "", "[CLASS:Button; INSTANCE:8; TEXT:Query]")
ControlClick("E-Locate", "", "[CLASS:Button; TEXT:Query; INSTANCE;8]")

do not seem to work yet.  I've tried CLASNN too.  No luck.  I will play around. 


Thanks for your reply.

Link to comment
Share on other sites

Sometimes the autoit spy tool can't grab controls within 'button' groups (which is what BewManNH was pointing out)...my signature will output all the controls for your window, but in the end, you should use controlcommand to reliably set your radio to 'checked', (as alienclone noted)

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Quote

 

Thank you all for your help.  I was able to make it work using the information from jdelaney's GetAllWindowControls.  My few attempts with controlcommand didn't work but I'm sure I can figure it out.

Thanks again.

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