You can load and unload scripts 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". The new action can now be used like any other action in EPLAN. For example, it can be called from the command line or assigned to a button.
Once the script has been loaded, it will be automatically loaded during the Startup of EPLAN and the action will be available again.
To unload or unregister a script, you just call the ribbon File > Extras > Interfaces > Scripts > Unload and select the respective script in the dialog: