Compiler work with macro that calls multiple macros?
Moderators: Dorian (MJT support), JRL
Compiler work with macro that calls multiple macros?
If I create an .exe file out of a macro that calls other macros how does it handle the other macros. For instance, if I were to distribute the .exe file would I also have to distribute the other .scp files.
thanks
thanks
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Compiled macros compiles in external called macros as well?
This topic hasn't been addressed in some time now...... Has this capability been added yet? It is not feasible for us to rewrite hundreds of seperate macros into Gosubs. There is also the problem of variable scoping. With external macros being called from the main script, I am free to reuse variable names, as they are kept seperate (local variables). If I try to put them all together as subroutines, then all the variables become global.
Please consider adding this to a future release if it is not already!!
Thanks.
p.s. Wonderful Product!
Please consider adding this to a future release if it is not already!!
Thanks.
p.s. Wonderful Product!
Yes, a compiled macro is just *one* compiled macro. We can't really compile in more than one macro. Not sure if that's possible.
But you can compile all your macros and have each one call the other with Run Program.
But you can compile all your macros and have each one call the other with Run Program.
MJT Net Support
[email protected]
[email protected]
Hi Guest22,
Unlike other languages such as Clipper, automatic dependent scripts compiling is not supported by Macro Scheduler.
Like what Support and Me_again suggest, you're better off compile your .scp files individually and run them in your MAIN script. As always, an .EXE runs significantly faster than the pure text version of the script, interpreted line by line by Macro Scheduler.
Perhaps it's a good idea to write a script to compile all scripts automatically to create multiple .EXE files.
Unlike other languages such as Clipper, automatic dependent scripts compiling is not supported by Macro Scheduler.
Like what Support and Me_again suggest, you're better off compile your .scp files individually and run them in your MAIN script. As always, an .EXE runs significantly faster than the pure text version of the script, interpreted line by line by Macro Scheduler.
Perhaps it's a good idea to write a script to compile all scripts automatically to create multiple .EXE files.
exe versus scp
Be aware of this:-
Scripts called from a main macro behave like subroutines.i.e. execution continues after the called script is finished. Executables, on the hand, run independently of whatever script or other executable may be running.
Scripts called from a main macro behave like subroutines.i.e. execution continues after the called script is finished. Executables, on the hand, run independently of whatever script or other executable may be running.
Kris
That is only true if RP_WAIT=0. If you set RP_WAIT to 1 the exe will behave like a subroutine as the script will wait until the exe has finished and terminated before it will continue:
Let>RP_WAIT=1
Run>yourexe.exe
Let>RP_WAIT=1
Run>yourexe.exe
MJT Net Support
[email protected]
[email protected]