Jump to content
Sign in to follow this  

Intercepting Button Click in a Non-AutoIt Form

Recommended Posts


What I have done:

I have been scouring the AutoIt forums and came across the include in the Example Scripts (not a support forum). Which is really close to what I need. I downloaded the example attachment and have been playing with it.

What I need:

Here is what I need. I need to hook a button click in another application and need to stop the click event from going through in the other application and for my script to activate on the button click in the other app.

I noticed that if you switch the _WinControlSetEvent to activate on the Mouse Down ($sCallOnHoldFunc) instead of Mouse Up ($sCallOnReleaseFunc) and you add a MsgBox in the While Wend loop that it causes the button click event to not finish in the other application. This is the effect I am going for. Is there a way I can tweak something to make this happen all the time in my script without having to use a MsgBox?

What I am up to:

For those who are questioning what my intention may be. I am a full time macro developer at my place of work. I am tasked with writing scrips to validate data in another application that my company owns but I am not allowed to touch the source code of. These scripts will be a temporary measure until our IT dept can get caught up on its work and make the required changes in the other application which are currently a low priority for IT. It is important for other parts of our business to make sure that the data is properly validated.

If you know the answer but want to make sure of my good intentions feel free to private message with how I should go about proving my intentions.

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.