Ok.. This is really simple, I doubt that you'll need pictures...
The first thing you do is make a trigger to begin construction. You will need one for each type of building that you make.
So... Let's use barracks as an example. We first create a trigger called "TrainStart". The trigger should be:
Events: Unit: Generic unit Event: Finishes construction.
Conditions: Unit Type Comparison: Unit type of constructed structure equal to Barracks.
Actions: Unit: Issue Uprade/Train order. Order Triggering unit to create 1 footman.
-----------
That's trigger one, to begin the training. Then we have another trigger that will make it loop.
This is trigger "TrainLoop"
Events: Unit: Generic unit Event: Finishes training a unit
Conditions: Boolean Comparison: Owner of triggering unit is in player group ( good side, bad side)
Actions: Unit: Issue Uprade/Train order. Order Triggering unit to train (unit-type of (trained unit)).
Unit: Issue Order Targeting a point: Order Trained unit to Attack-Move to center of region: ( Region of enemy base. You will need two of this trigger, one for each team.)
-------
Soooo... We need one Trainstart for every building we want to auto train, but
Only two TrainLoop, because it makes every building, as soon as it finishes creating a unit, to make another one and orders the created unit to attack the enemy base. This system also makes it easier to cancel in order to upgrade the building, because it only builds another unit after it completes.
Good luck in your map, I hope i helped.