The motivations for doing this are:
1) this removes the script from the set file - it now lives in a disk file instead of in the set file.
That may or may not be important to you depending on what you are doing.
For example, in my MachStdMill software, this technique is used to let there be only one copy of a routine in one disk file. That's a huge deal when the only alternative is 106 copies of the routine that all live inside the set file. So this approach can be a huge maintenance productivity gain for complicated software. On the flip side, for a single simple button, it's probably more trouble than it's worth.
2) The external disk file called by RunScript can be either source (m1s) or compiled (mcc). So if you want to use an mcc file (for whatever reason), you pretty much have to make the compiled script live outside the set file.
Dave
1) look up RunScript. The call allows a script to call a named disk file which contains other scritpts.
the disk file invoked can be either a .m1s or a .mcc file.
2) compile the code you want into an mcc file.
3) make the button code in the set file be a RunScript line that invokes your compiled code.
Other than hiding your macro code from the end-user, could you elaborate on the possible benefits of doing this?
Thanks.