grimta Posted July 26, 2017 Share Posted July 26, 2017 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 More sharing options...
Danp2 Posted July 26, 2017 Share Posted July 26, 2017 Move the code to a function that gets called with the appropriate parameter values. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 26, 2017 Moderators Share Posted July 26, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now