Check if Lotus notes is executing any lotusscript or it is idle

Hi,

I am involved in testing lotus notes application where i programmatically launch forms (custom forms in our organization), fill some data and send the forms. While sending it takes 10-15 seconds for the form to close(executing the lotusscript that is coded in the form). When i send 5 requests one after the another and i do not wait for the previous forms to close, lotus notes crashes.

Is there any way where i can determine if lotus notes is executing any lotus script or it is free. Any possible way is welcome be it C/C++ or Eclipse java based method.

Regards,

Bikash