kbabb

how to control click 4 next buttons in a row

6 posts in this topic

i am trying to automatically install some software

but halfway through the install i need to click 4 next button in a row but they all have the same title text and button id

how can i make sure the buttons are clicked i tried to use sleep in between the control click which worked if they are all set to 2000 but i wanted to steamline the install if possible.

i tried to write a function to click the check the results and if it failed wait 500 then run the function again which i now know is a bad idea

would a do loop work?

Share this post


Link to post
Share on other sites



An easy way would be to send the alt key of the next button, if there is one. If it's "N", you can just use the commands

for $i = 1 to 4

  send("!n")

  sleep(200)

next

To find out what it is, bring up the button and press the alt key, if a character is underlined, that's the alt key.

Good luck!

Share this post


Link to post
Share on other sites

Text may surely differ

Else hidden text

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Better solution

Change title of that Windows

When the new Windows then click

Edited by sdfaheemuddin

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Example

For x=1 to 4

Winwait("software title")

controlclick("software title","","Button1")

WinSetTitle ("software title","","Changed title")

Next

Edited by sdfaheemuddin

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

This is where [Class: Instance] can probably come into play. Even if its the same button the Instance counter goes up.

But you can click the button using the ID you just need the proper Wait, so for that if you can find text on the window, or last resort use sleep()

Could you post a screenshot of what you get with the AutoIT WindowInfo tool for a couple of the buttons?

Edited by ViciousXUSMC

Share this post


Link to post
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