My script stops with an error message that says “Not allowed inside the Sub DL_OnSend() or Sub DL_OnReceive() subroutine”, even though the command in question is definitively not executed within a Sub DL_OnSend() or Sub DL_OnReceive() procedure. What is wrong here?

My script stops with an error message that says “Not allowed inside the Sub DL_OnSend() or Sub DL_OnReceive() subroutine”, even though the command in question is definitively not executed within a Sub DL_OnSend() or Sub DL_OnReceive() procedure. What is wrong here?

Applies to: Docklight Scripting V1.9 (build V1.9.21), Article ID: dl_prb027

This behavior is probably caused by bug a in Docklight Scripting V1.9.21:
If you are using “Exit Sub” statements within your in DL_OnSend() or DL_OnReceive() code parts, Docklight Scripting does not recognize correctly that the event procedure has been left.

The bug has been fixed in Docklight Scripting V2.x. See the link below for the updated software.

Docklight Downloads