May 11, 2010

Macro Scheduler 12 Beta Updates

Filed under: Uncategorized — Marcus Tettmar @ 3:34 pm

Just a quick reminder that you can keep up to date with beta builds at the beta forum. The latest build is 028. So if you have an earlier build you should download now from the registered user area.

Everything seems to be going quite well and all being well we should now be in a position to release v12 by the end of May.

May 7, 2010

Run All Macros in a Folder/Group

Filed under: Automation,Scripting — Marcus Tettmar @ 3:26 pm

Someone asked me today how to run all macros found in a folder. This simple script will run all macros it finds in its own folder in turn:

GetFileList>%SCRIPT_DIR%\*.scp,MacroFiles
Separate>MacroFiles,;,Macros
If>Macros_count>0
  Let>k=0
  Repeat>k
    Let>k=k+1
    Let>this_macro=Macros_%k%
    If>this_macro<>SCRIPT_FILE
      Macro>this_macro
    Endif
  Until>k=Macros_count
Endif

Note the check to make sure it doesn’t run itself!

This could be useful where you want a quick way to schedule a series of macros. Schedule this script and then all you need to do to add another to the schedule is to drop it into the same folder (or macro group).

For a bit more control consider naming each macro with a numeric prefix and then sort the array to determine the order in which they are run. Version 12 (currently in beta) has a built in ArraySort function. Or use this QuickSort algorithm.

« Newer Posts