kbabb Posted April 16, 2015 Share Posted April 16, 2015 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? Link to comment Share on other sites More sharing options...
rodent1 Posted April 16, 2015 Share Posted April 16, 2015 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! Link to comment Share on other sites More sharing options...
sdfaheemuddin Posted April 17, 2015 Share Posted April 17, 2015 Text may surely differ Else hidden text Link to comment Share on other sites More sharing options...
sdfaheemuddin Posted April 17, 2015 Share Posted April 17, 2015 (edited) Better solution Change title of that Windows When the new Windows then click Edited April 17, 2015 by sdfaheemuddin Link to comment Share on other sites More sharing options...
sdfaheemuddin Posted April 17, 2015 Share Posted April 17, 2015 (edited) Example For x=1 to 4 Winwait("software title") controlclick("software title","","Button1") WinSetTitle ("software title","","Changed title") Next Edited April 17, 2015 by sdfaheemuddin Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted April 17, 2015 Share Posted April 17, 2015 (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 April 17, 2015 by ViciousXUSMC Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now