PINTO1927 Posted June 29, 2016 Posted June 29, 2016 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?
Moderators JLogan3o13 Posted June 29, 2016 Moderators Posted June 29, 2016 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!
PINTO1927 Posted June 29, 2016 Author Posted June 29, 2016 (edited) I'm trying to do a control-click on the "PAUSA" button, I am attaching the screen. Edited June 29, 2016 by PINTO1927
AutoBert Posted June 29, 2016 Posted June 29, 2016 6 hours ago, PINTO1927 said: I'm trying to do a control-click on the "PAUSA" button, I am attaching the screen. and why didn't use the controlid?
PINTO1927 Posted June 30, 2016 Author Posted June 30, 2016 AutoIT Windows Info section Control ID does not show me any results. That code would you feel?
PINTO1927 Posted June 30, 2016 Author Posted June 30, 2016 This is a result that brings me: expandcollapse popup>>>> 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
PINTO1927 Posted June 30, 2016 Author Posted June 30, 2016 (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 June 30, 2016 by PINTO1927
AutoBert Posted June 30, 2016 Posted June 30, 2016 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.
PINTO1927 Posted June 30, 2016 Author Posted June 30, 2016 the toolbar tab does not show me anything ..
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now