Aegis Posted January 21, 2018 Posted January 21, 2018 So, I am pretty new to this. Spent a few hours over the past few days and not doing too bad IMO but I can't seem to get my head around using a script from another file. I have done some research on it and as for as I can tell I need to start off with #include <File2> in the first file to gain access to anything in the second but after that I get lost. In File2 I have a Func with everything I need but I can't seem to find what I need to do from there. Could someone please point me in the right direction or explain what else is needed? Thanks in advance.
ripdad Posted January 21, 2018 Posted January 21, 2018 You didn't mention what the name of the #include file is - or - what function you want to call from it. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward
Aegis Posted January 21, 2018 Author Posted January 21, 2018 the #include file is one i have done up myself. lets say I have File1 that Im using now with the #include <File2> in it. In File2 I have: Func MyFunc() ;blahblah EndFunc In File1: #include <File2> Then this is where I have trouble. What do I have to do next to get the code from File2 to run in File1?
ripdad Posted January 21, 2018 Posted January 21, 2018 (edited) Without any runnable code posted, it would be difficult to determine how to call the function properly. But, you would call the function like this for general purposes: #include "File2.au3" MyFunc() ...and then check for any errors. Edited January 21, 2018 by ripdad "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward
Aegis Posted January 21, 2018 Author Posted January 21, 2018 wow, thank you very much. spent so long trying to figure it out and it was that simple
ripdad Posted January 21, 2018 Posted January 21, 2018 Glad to help -- Welcome to the forums. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward
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