Sign in to follow this  
Followers 0
CyberwormXT

Include Help

5 posts in this topic

Hi!

I'm new here and I got a question regarding #include.

Is it possible to include scripts via loop? Let's say that I got an array containing the files in a directory. Now I loop over that array and for each element (e.g. 1.au3) I want to include that element into my script (so that it will result in a #include "dirpath\1.au3").

If that's not possible, can I include a whole directory into my script?

Thanks for the help,

CyberwormXT

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Yes I already tried that. I have two files I want to include: 1.au3 and 2.au3.

Both scripts contain a simple function that will Display a Message box (e.g. "I'm #1").

After including both files via loop I try to call that function. But after trying to run the script it tells me that the function cannot be found. So either I'm doing something wrong or the scripts are not included at all.

Edited by CyberwormXT

Share this post


Link to post
Share on other sites

Includes are not ment to be used this way, honestly i don't think it is possible. Put all the functions in one file and include that.

Share this post


Link to post
Share on other sites

Hmm. I see. Well, nevermind then. I'll manually include the files ;).

Thanks anyway :evil:.

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