Using AutoIt
Posted: 20 Nov 2010, 09:55
Maybe some of you know great program for automating tasks in Windows - AutoIt
This nice freeware tool is based on its own scripting language and it has really good control possibilities: windows management, process management, mouse & keyboard operations etc.
What is important for me is that it provides most of those possibilities wrapped in COM object called AutoitX.
And you guess right, this object can be easily used in HIDmacros scripts.
So you know that HIDMacros author is quite lazy and didn't provide for example GetMousePos method or GetWindowPos. And how can you then script your mouse clicks to specific autopilot window when this window can be moved on your screen?
Try using autoitX.
In routines:
In macro code:
PS: If someone wants to write more sophisticated tutorial how to install & register AutoitX, please feel free. I'm just announcing the possibility.
This nice freeware tool is based on its own scripting language and it has really good control possibilities: windows management, process management, mouse & keyboard operations etc.
What is important for me is that it provides most of those possibilities wrapped in COM object called AutoitX.
And you guess right, this object can be easily used in HIDmacros scripts.
So you know that HIDMacros author is quite lazy and didn't provide for example GetMousePos method or GetWindowPos. And how can you then script your mouse clicks to specific autopilot window when this window can be moved on your screen?
Try using autoitX.
In routines:
Code: Select all
Dim oAutoIt
Set oAutoIt = CreateObject("AutoItX3.Control")
Code: Select all
x = oAutoIt.WinGetPosX("AP")
y = oAutoIt.WinGetPosY("AP")
HIDMacros.MouseClick x+20, y+50, 1