Can you have "include" files?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
DaveM

Can you have "include" files?

Post by DaveM » Sun Aug 17, 2003 11:16 am

I'd like to split my macros into separate files and then include them in a main file. i.e. I'd have all my LET statements in one file, all my SRT's in another and then 'include' these two files in a main file.
The advantage is I'd have a modular macro which is much easier to understand.... and shorter.

Lumumba

Post by Lumumba » Sun Aug 17, 2003 8:02 pm

I think the issue is to "transfer" all variables to the main file/script.
So it would make sense to use a standard configuaration file. which could be "read" by the main script

instead of:
Let>CurrentConnection=UUNet

use this: DialUp.ini
[Provider]
CurrentConnection=UUNet

DaveM

but then I'd have to...

Post by DaveM » Mon Aug 18, 2003 7:59 am

I saw this function but it only solves half the problem in keeping my variables in a single file. It doesn't solve the "tidyness" of my macros as I'd have to replace each Let>... with a ReadIniFile>.... statement.

I just had another thought though, maybe I could put all the initialisation stuff in a subroutine right at the bottom of the script, then call it first. I just hate having to scroll through 100 lines of variables to get to the code.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts