Jump to content

Recommended Posts

Posted

Hello guys,
I need to be able to make a mouse click on a program.
Via Windows AutoIT info I managed to recover the data that are needed me but I can not make him do the left click.

$gat = WinGetHandle("[TITLE:GAT.crm [DIST ]; CLASS:OMain; INSTANCE:1]", "")
ControlClick($gat, "", "PAUSA")

did I do something wrong? :'(

windows info.png

  • Moderators
Posted

OMain is the Class for the entire window, whereas MsoCommandBar Instance 1 would be the class info for the Control itself. Which are you trying to click on?

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

Posted

This is a result that brings me:

>>>> Window <<<<
Title:  GAT.crm [DIST ]
Class:  OMain
Position:   -8, -8
Size:   1616, 876
Style:  0x17CF0000
ExStyle:    0x00000100
Handle: 0x0000000000420676

>>>> Control <<<<
Class:  MsoCommandBar
Instance:   1
ClassnameNN:    MsoCommandBar1
Name:   
Advanced (Class):   [CLASS:MsoCommandBar; INSTANCE:1]
ID: 
Text:   Main
Position:   0, 25
Size:   986, 26
ControlClick Coords:    816, 18
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x00000000003E037A

>>>> Mouse <<<<
Position:   816, 65
Cursor ID:  0
Color:  0xA9C7F0

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
MsoDockLeft
MsoDockRight
MsoDockTop
Main
Menu Bar
MsoDockBottom
Menu Principale


>>>> Hidden Text <<<<
Gat-enterprise : Project - DIST (Access 2000 file format)
MSO Generic Control Container

 

Posted (edited)

With this code I was able to push the desired button by cordinates, but if I change resolution rightly does not work.

$services = "GAT.crm [DIST"

_WinWaitActivate("GAT.crm [DIST","")
Sleep(1000)
ControlClick($services, "", "MsoCommandBar1", "Left", 1, 807, 10)

Since AutoIT Windows Info does not provide me the info ControlID, there is the possibility to intercept the button text, in this case "PAUSA"?

Edited by PINTO1927
Posted

You can test if Controlcommand gives you the ID:

Quote

"SendCommandID", Command ID Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.

 

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
×
×
  • Create New...