Possible to replay repetitive tasks using Python?
If you pull down the Info header you will find that a fair amount of operations you can perform in Blender are printed there for relatively simple stuff such as adding a lamp or a modifier etc.

This example:


adds a cube
scales it by 2.0
translates on the Z axis by 1.0.
sets the color to red
shows the name
renames the object.





Select the lines (mouse-click, border-select or AKey)
Ctrl+C to copy the selected lines.
Paste into the text editor.
add import bpy at the top of the text block.




After that, if you were to have a look at the api, you could cut out much of the fluff and just use said commands in a script to reuse whenever you need to provided it is simple enough and in the correct context.

For example:

bpy.ops.mesh.primitive_cube_add(
        radius=1.0, view_align=False, enter_editmode=False,
        location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0),
        layers=(False, False, False, False, False, False,
                False, False, False, False, False, False,
                False, False, False, False, False, False,
                False, False))


... can be shortened to bpy.ops.mesh.primitive_cube_add() in most situations.

This is as close to a macro like functionality that you can get in Blender and it is linear so any actual repetitive bits will have to be crafted by you, loops etc. It is also worth noting that many of these commands need to be run in a specific context so I would recommend using it as a means of learning the correct calls instead of trying to reuse it directly.

Note

For most operations, there is an accompanying line of code printed. Including changing numeric values, toggles... etc.

Excluded operations are typically not useful to redo, zooming/panning, setting the cursor location... etc.