docta608 Posted October 4, 2018 Share Posted October 4, 2018 So, i just started learning AutoIT about a week ago with minimal scripting experience. I am down to this being the last box to click in my script, and it doesn't have a title, I got WinWait and WinActivate to work but not the ControlClick and so I am looking for some guidance. I have tried several variations, but I have been stuck for a day or two now and and am looking for assistance. The box is just an OK box to end an install of a program. WinActivate ( "[CLASS:#32770]","") ControlClick( "[CLASS:#32770]","", "[CLASSNN:Button1]", button = 'primary', clicks = 1, 39, 12) >>>> Window <<<< Title: Class: #32770 Position: 476, 296 Size: 417, 143 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x0000000000030260 >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 Name: Advanced (Class): [CLASS:Button; INSTANCE:1] ID: 2 Text: OK Position: 321, 81 Size: 75, 23 ControlClick Coords: 52, 13 Style: 0x50030000 ExStyle: 0x00000004 Handle: 0x0000000000030278 >>>> Mouse <<<< Position: 376, 120 Cursor ID: 0 Color: 0xE1E1E1 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< OK The computer will have to be restarted for all upgrades to apply. Do not run SmartSearch until the computer is restarted. >>>> Hidden Text <<<< Link to comment Share on other sites More sharing options...
Davidowicza Posted October 4, 2018 Share Posted October 4, 2018 (edited) Since you have the window activated. Why don't you just do a Send("{ENTER}")? Edited October 4, 2018 by Davidowicza As Docta said, I forgot quotes. Link to comment Share on other sites More sharing options...
docta608 Posted October 4, 2018 Author Share Posted October 4, 2018 Well because i am new to this and still learning. This worked so thank you. Had to add quotes but it worked. Link to comment Share on other sites More sharing options...
Davidowicza Posted October 4, 2018 Share Posted October 4, 2018 Glad I could help Link to comment Share on other sites More sharing options...
caramen Posted October 5, 2018 Share Posted October 5, 2018 (edited) You Can also do $Tittle = WinGetTittle("[active]") MsgBox(0, "wintittle", $Tittle ) Work when tittle is complicated Edited October 5, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki 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