Jump to content

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.

 

 

 

Link to comment
Share on other sites

  • Moderators

I would suggest posting your code, or at least a reproducer, rather than having us guess :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...