Jump to content
Sign in to follow this  

On Event Listening

Recommended Posts


Hello. I'm new here and trying to learn more on how to automate program installations using AutoIt.

Is there any way to trigger code execution based on I/O events, such as a key press or a mouse click? What I want to do is make a tool which will make creating automation scripts easier by automatically recording pertinent information while I do an installation compared to jotting it all down manually and looking the information up the AutoIt Info tool.

Sort of like, automatically recording the coordinates and component ID of the control whenever you make a mouse click, or recording the title and text of the current active window whenever something changes.

It would be helpful too if I was able to make a record of key presses too but I've been reading around the forums and apparently, there is a concern about AutoIt being used to make keyloggers, which limits what can be legally done using AutoIt.

It would be nice if I can make a script that I can run when I start installation of a new program, which will make a log of actions and events that I can go back to and read so I can generate an installation script from it.

Is it possible?

Share this post

Link to post
Share on other sites

AU3Recorder (Alt+F6 in SciTE) does (mostly) what you want. When started it records all actions which then can be run as an AutoIt script. Unfortunately it doesn't record controls clicked it only records screen coordinates. So it might fail when window positions or screen resolution changes.

Edited by water

My UDFs and Tutorials:


Active Directory (NEW 2018-12-03 - Version - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

ADO - Wiki


Share this post

Link to post
Share on other sites

Yeah. It would be better if I can auto record component IDs though, which is why I'm more interested to learn how it can be done. A dump of event information would be more useful since you can custom fit and adjust a script and slot in some sleep and wait functions where necessary, especially when running the script on slow machines.

AutoIt Info shows that you can get the component ID of a control on a 'mouse over'. What's missing is the capability of executing the function on every mouse click.

I do understand that the same actions can also be used for exploits, but it would really be useful when utilized properly.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this