Using AutoIt

How can be this controlled in that simulator? Can HIDmacros be used with this application?
Post Reply
admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Using AutoIt

Post by admin » 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:

Code: Select all

Dim oAutoIt
Set oAutoIt = CreateObject("AutoItX3.Control")
In macro code:

Code: Select all

x = oAutoIt.WinGetPosX("AP")
y = oAutoIt.WinGetPosY("AP")
HIDMacros.MouseClick x+20, y+50, 1
PS: If someone wants to write more sophisticated tutorial how to install & register AutoitX, please feel free. I'm just announcing the possibility.
Petr Medek
LUAmacros author

friedrich
Posts: 5
Joined: 17 Mar 2012, 20:22

Re: Using AutoIt

Post by friedrich » 21 Mar 2012, 10:16

Thank you for this information.

Anyhow before adding a new external program i will try to find a possibility to get the current x,y position when moving the external program on the screen. Maybe it is possible.

Meanwhile best regards,

Friedrich

israelz74
Posts: 1
Joined: 27 Oct 2019, 13:42

Re: Using AutoIt

Post by israelz74 » 27 Oct 2019, 13:46

Hi

Why am i getting "Activex could not be found" on compilation of the createobject in the routines?

Sorry if it is a beginner question. I double checked that a vbs with these commands can create the object autoitx3 and it does.

Thanks

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Using AutoIt

Post by admin » 28 Oct 2019, 17:53

No idea and don't use/have HidMacros any more. You can try to run as admin.
Petr Medek
LUAmacros author

Post Reply