Jump to content
Sign in to follow this  

Object Oriented AutoIt / Use same code several times.

Recommended Posts


Hi everyone,


I know AutoIt is not Object Oriented, but maybe some one will know the way to work around it.


So, what is the situation, I have made a simple mailing application which will send proofs to the client by pressing the button:

I have tree button NEW, RENEW and REPLACEMENT, 


THE MAIN ISSUE is that I have a huge piece of code which is responsible to send appropriate proofs based on pre-defined variables.

What I'm looking for is that when I press NEW it will use variables_new and pass them to this code block and proofs will be sent, and when RENEW will use variables_renew which will be passed to the same block of code and will be executed again.


Currently I have to copy this mailing system code 3 times to make it work for three different buttons.


PS. Currently I'm using CASE to switch between buttons.
Any suggestions, ideas, way of doing, samples, will be appreciated.


Thank you.




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