Jump to content
Sign in to follow this  
sb1920alk

Perform an action prior to clicking a button

Recommended Posts

sb1920alk

I would like to know if it's possible to watch for a button, and if it's clicked, trigger some code.

Specifically: I have a legacy application that to print, takes a screen shot of the application window, opens a print dialogue box, then sends the screen shot to the chosen printer. On Windows XP, that was fine. On Windows 7, it's actually including the print dialogue box in the printout. ...already contacted the vendor and it's unlikely they're going to do anything about it. So, if I could monitor the "Print" button on the print dialogue box, when the user clicks "Print" I could trigger a function to move the box or make it hidden or something, then click the "Print" button. I'm comfortable with everything in the script except the "Monitor_a_control_and_do_something_before_it_does_what_it_was_originally_intended_to_do" feature.

FYI, I've already tried remapping the printscreen key to dump a screen shot to a file, then print it. That sort-of works, but the legacy app isn't using a pure screenshot. Instead, it's doing some things with the layout that the users are used to and I haven't been able to reproduce all of those settings.

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.