Jump to content

Click a button through Title-Class-Instance


Recommended Posts

  • Moderators

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!

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

×
×
  • Create New...