Jump to content

ControlClick to click button


Recommended Posts

Hello, I am trying to use control click to click a button on Oracle SQL Developer. The problem is that when I use AutoItInfo, the only thing it can pick up is the title, class and position; I do not get anything under the controls. I am trying to clikc a button located at 15.100, here is the code that I am trying to use:

Opt("WinTitleMatchMode",2 )
    ControlFocus("Oracle SQL Developer", '', '')
    ControlClick('Oracle SQL Developer', '', '', 'left', 1, 15, 110)

The window gets focused but nothing gets clicked. Any ideas as to why?

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the DEV forum very clearly states:

Quote

Do not create AutoIt-related topics here, use AutoIt General Help and Support

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

No help yet. Here is the code that I have now:

Opt("WinTitleMatchMode",2 )
    $handle = WinGetHandle('[CLASS:SunAwtFrame]' , '')
    sleep(3000)
    $control = ControlClick($handle, '', '', '', 1, 15, 100)

The problem comes from at the ControlClick, it is not clicking at the 15.100 position of the window, it is simply clicking where ever the mouse is currently at. I have tried giving focus to the window, but same result.

Here is what is given in the window info:

>>>> Window <<<<
Title:    Oracle SQL Developer
Class:    SunAwtFrame
Position:    -4, -4
Size:    1688, 1030
Style:    0x17CF0000
ExStyle:    0x00000100
Handle:    0x0000000000030194

>>>> Control <<<<
Class:    
Instance:    
ClassnameNN:    
Name:    
Advanced (Class):    
ID:    
Text:    
Position:    
Size:    
ControlClick Coords:    
Style:    
ExStyle:    
Handle:    

>>>> Mouse <<<<
Position:    26, 116
Cursor ID:    0
Color:    0xF1F1F1

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<


>>>> Hidden Text <<<<
 

Please guys, any ideas as to why?

Ultimately I want to run it in the background or in a minimized window, so I do not want to use MouseMove or MouseClick. 

Edited by Chance1
Link to comment
Share on other sites

Then you should read FAQ 31 and use simple spy and IUIAutomation as it seems to be SunAWTFrame it could even be you have to deal with Java Accessibility Bridge.

Your other requirements on background and minimized window will be more challenging simplest advice for that is run your stuff in a virtual machine.

 

 

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