Jump to content

How to create functions without them actually executing from the declaration?


Recommended Posts

So I put what function I want at the top of my code, but it always does what the function says to do, but I only want it to execute when I call the function. How can I make it do this?

Declaring a function alone does not call the function when your script runs, unless you named the function OnAutoItStart/OnAutoItExit.

If it's being called, there has to be a line in your code or an include that is calling it.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

If it's being called, there has to be a line in your code or an include that is calling it.

@FadetoGrey

Are you using an #include statement for the file that has your function in it?

Most likely cause is that you have code in the included file that's launching right away.

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...