.



Core Functions    
Macros

Macros - background processing

It is possible to create a macro to run in the background, waking up every so often to query for something or inform you of something. It can be done by creating a Startup macro that looks something like this:

While (True)

`your processing goes here

DELAY PROCESS (Current Process;3600)

End while

The While condition is always true, so the macro never finishes. A side effect is that you always have an extra process open in memory: even if a process is delayed it has a slightly detrimental effect on processing speed.

There is an alternative method based around the Enterprise 6 background process which checks for ‘Diary macros & Messages’ to run. If you have this check box and ‘Play Data Entry macros’ (also in Personnel) switched on and you have set up a macro with a macro Code of ‘Background’, this macro will be run once every 90 seconds or so. The Background macro should be ‘Same Process’ because it runs in the Diary-checking process. It is universal as there is one Background Process for all users even if you specified a Person, but of course you can turn off the Diary-checking Process user by user. The code of the macro should not have a never-ending while loop as above and should not delay itself - those are controlled automatically.

This method will degrade performance notably less if you were going to use the Diary-checking Process anyway as it removes the need to maintain an extra process.



 

Published date: Fri, 23 May 2008 17:04:33 GMT

© 2006 - 2007 Daybook Limited, All trademarks accepted. All Rights Reserved!
Site Index