You can define an Init-Form. This is done by addin a row in the ar.cfg/conf
Init-Form: MyInitFormName
The form is run in the background.
Create a Run-Macro-Active-Link that is attached to the Init-Form that trigger on Window-Open or some such thing. The Init-Form itself will not be shown. It runs in the background.
And macros does not work in Mid-Tier. If possible, replace the macro-ality with Window-Open-ality...