You can load (and unload) a script in EPLAN. In this case, not the start function is executed, but special functions are registered in EPLAN. You can add a new Action to EPLAN, add ribbon Buttons to the Extension-Ribbon->API command group, and register functions to react on EPLAN events.
When a script with the above code is loaded, the function "MyFunctionAsAction" is registered in EPLAN as action by the name "MyScriptAction". Now the new action can be used like any other action in EPLAN. It can e.g. be called by the command line or it can be assigned to a button.
Once the script was loaded, it will be automatically loaded during the Startup of EPLAN and the action will again be available.
To unload (unregister) a script, you just call the ribbon "File", "Extras", "Interfaces", "Scripts" > "Unload" and select the respective script in the dialog: