Sign in to follow this  
Followers 0
racerrunner

Procedure or Function

3 posts in this topic

Hi all,

Can we write a procedure in AUTOIT3? I have repeated code in my program. Was wondering

whether it is possible to write a procedure to make the program modular?

If i use FUNC, must i add a return statement. Because the repeated which i write doesnt return value?

Please assist.

Thank you

Share this post


Link to post
Share on other sites



There's no need for a "must" have return value... Most make their functions Return 1 for success and Return 0 for failure, but it's your choice.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I'm working on an automated installer for a mobile phone and sets it up exactly as I need it on different environments, and it wasn't until now that I really appreciate the benefit for error tracking in recursive functions.

It's always a good practice to be able to track what went on at which point, it'll help you identify and avoid bugs.

IVAN

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  
Followers 0