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