User Submitted Macro

Heartbeat

Written by Kore Peterson

What it does

This macro demonstrates a simple technique for catching macros that end unexpectedly.

To install

Download the macro file umheartbeat.mex and save it to your hard drive where you store your macro file(s). Import the macros into your existing macro file by clicking File, Import, Import Macros.

To use

To run the sample, run the “run_this” macro. There is a macro stop command in the middle of the macro that you can disable or enable to see how it works. You can change the time it takes to alert by setting the schedule in the heartbeat macro.

How it works

This macro relies on the fact that Macro Express only runs a single Macro at a time. When you run your main macro, enable the heartbeat macro that is activated based on time. At the end of your main macro, disable the heartbeat macro. If the main macro runs from start to finish without a problem, the heartbeat macro never has a chance to run. If the main macro ends without disabling the heartbeat macro, then the heartbeat macro will run at its next scheduled time.

Limitations

This a simple technique and will not work if Macro Express crashes or your system hangs or any number of other things happen.

Requirements

This macro was written using Macro Express 3.4a.