nested Include>

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
mafiamoe
Junior Coder
Posts: 38
Joined: Thu Jul 06, 2006 8:28 am

nested Include>

Post by mafiamoe » Wed Feb 11, 2009 10:42 pm

Currently when compiling the Include>code.scp works for the first level of code included, but not for any include commands within that included code. Currently it needs the .scp files to be on that computer or it gives an error.

Would there be a way to have the compile sequence check for and run any includes in the included code?

While on this subject, any way to allow variables into the Include function? Like Include>%Script_Dir%\folder\code.scp

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

cwd> then include>

Post by gdyvig » Wed Feb 11, 2009 11:04 pm

Macro Scheduler already has this capability for compiled scripts with nested includes. Try this:

CWD>%codedir%
Include>code.scp

Does it work?

Gale

mafiamoe
Junior Coder
Posts: 38
Joined: Thu Jul 06, 2006 8:28 am

Post by mafiamoe » Thu Feb 12, 2009 7:40 am

*This post includes a bug description, however I will be posting the bug in the appropriate location for Dev's attention.


Works for when running the script, but not when editing the script after opening it in the Macro Scheduler window. This seems like a bug because it works when editing the file when opening it from the file.

This is however a gimmick around using variables in the Include function, but sounds a lot easier to implement but probably led to the bug above (My guess is the Script_Dir is saved as a special variable for the Include function, but this variable isn't being set correctly when opening a file to edit from the Macro Scheduler window).

I looked into this further and found that you can use this to include file names, in the Script_Dir by using Include>folder\code.scp . I probably didn't notice this feature at all because of the bug I seem to be running into. This seems like it will work out nicely.


However, all of this still doesn't cover nested Includes, but that would probably be pretty hard to do, especially if you were looking at including/excluding code with If/Else commands.

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