FadetoGrey Posted May 12, 2009 Posted May 12, 2009 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?
Skruge Posted May 12, 2009 Posted May 12, 2009 FadetoGrey said: 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]
ResNullius Posted May 12, 2009 Posted May 12, 2009 Skruge said: If it's being called, there has to be a line in your code or an include that is calling it.@FadetoGreyAre 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.
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