This allows for ships to dock with piston connectors without having to convert the other grid to a station. You can also do this with normal timer blocks and event controllers, but they are not very reliable in my personal experience.
You can optionally invoke the script manually, through something like an event controller. The arguments are as follows:
-`dock` - Triggers the docking process
-`undock` - Triggers the undocking process
If you want to use the script manually, you should disable `Polling` in the Custom Data field of the programmable block running the script.