Sign in to follow this  
Followers 0
Chance1

ControlClick to click button

5 posts in this topic

#1 ·  Posted

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted

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

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

Could try this

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#5 ·  Posted

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.

 

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0