Jump to content
Sign in to follow this  
omikron48

On Event Listening

Recommended Posts

omikron48

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
water

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:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
omikron48

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  

×