Jump to content

Control Click on a Box with no title


Recommended Posts

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

 

 

OKBox.png

Link to comment
Share on other sites

You Can also do

$Tittle = WinGetTittle("[active]")  

MsgBox(0, "wintittle", $Tittle ) 

Work when tittle is complicated

 

 

 

Edited 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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