Jump to content

ControlClick refuses to click on button


weevil
 Share

Recommended Posts

Hi,

 

I've got a funny window that doesn't seem to be playing ball.  The Window info is below:

No matter what I try, either by using the title, the class, bringing it into focus using WinExist IF statement, even just using "Send ("{ENTER}")" isn't working and the button is in focus!!

 

>>>> Window <<<<
Title:  Reflection Workspace
Class:  #32770
Position:   401, 422
Size:   484, 189
Style:  0x94C801C5
ExStyle:    0x00010101
Handle: 0x003F1300

>>>> Control <<<<
Class:  Button
Instance:   1
ClassnameNN:    Button1
Name:   
Advanced (Class):   [CLASS:Button; INSTANCE:1]
ID: 2
Text:   OK
Position:   382, 124
Size:   88, 26
ControlClick Coords:    25, 22
Style:  0x50030000
ExStyle:    0x00000004
Handle: 0x005F0AC6

>>>> Mouse <<<<
Position:   811, 593
Cursor ID:  0
Color:  0xCFCFCF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
OK
Unable to locate Theme file: ProgramFilesFolder\Attachmate\Reflection\Private\Default\Users\Themes\Reflection2007.3270.themex.
The default theme will be used.


>>>> Hidden Text <<<<

My code for this window at the moment is:

While 1
    If WinExists("[CLASS:#32770") Then
      MsgBox(0, "", "Win now exists")
        $hWnd = WinGetHandle("[Class:#32770]")
        Sleep(2000) 
        ControlClick($hWnd, "", "[CLASS:Button1; INSTANCE:1]")
        Send("{ENTER}")
        Exit
    Else
        ContinueLoop
    EndIf
WEnd

As you can see I tried to manually press enter which just doesn't do anything,  I've confirmed via ConsoleWrite debugging that the if statement does actually find the window, but nothing happens. :( WindowInfo also seems to find 3 distinct sections of the popup box.  I've attached 3 images, each one has the windowinfo tool pointing at different bits - the button, the body and the title.  How do I know which one autoit will see at any given time?  Or will it see all 3?  Very confused!

 

title.png

body.png

button.png

Edited by weevil
added more info
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...