From, Stackoverflow:
How to use Autoit COM in python:
In order to call Autoit functions from python using Autoit's COM interface, there are few prerequisites:
- An installation of python with the appropriate python for windows extentions (pywin32)
- An full installation of Autoit. (It is possible to only install the COM portion, but it is more involved than a full installation.)
In order to call autoit functions from python, add the following code:
import win32com.client
autoit = win32com.client.Dispatch("AutoItX3.Control")
You can now call autoit functions with the autoit variable.
autoit.Run("NotePad.exe")
autoit.ControlClick(WINDOW, "", "[CLASSNN:TTreeView1]", "left", 1, 53, 41)
Note that not all autoit functions are available through the COM interface. To see which functions are, see the help file on AutoItX. This help file can be found in the start menu at ("AutoIt v3" -> "AutoItX" -> "AutoItX Help File") or in the AutoIt install directory (...AutoIt3AutoItXAutoItX.chm)
Thank you for your answare, but i think we missunderstand eachother.
I already build python/autoitX environment, and i can click on almost everithink except Toolbar buttons.
And i know well help files ofc.
So, i explain more specific:
In default autoit the ControlCommand have this parameter: "SendCommandID",
Command ID Simulates the WM_COMMAND message. Usually used for ToolbarWindow32 controls - use the ToolBar tab of Au3Info to get the Command ID.
But in autoitX this parameter is missing...
In default autoit there is many user defined _GuiCtrlToolbar_... functions. Those are missing from autoitX.
After this information, can anyone tell me something about my original questions?
- how can i click on Toolbar buttons?
- how can i ask Tooltip of Toolbar buttons?
- how can i ask states of Toolbar buttons?
Thanks
Sinnach