Running a script for each frame
One way is by using drivers. Drivers allow you to calculate a value to use, this may be from other values in the same object, or from other objects. This answer provides examples. Also consider that drivers may be disabled by the user.

Another way is to setup a handler function. You could choose between using frame_change_post or a render_pre. You simply define your function and then append it to the handler list, then remove it when it is no longer needed.

def my_handler(scene):
    val = scene.objects['Cube'].location.x
    scene.objects['Sphere'].location.y = val + 1.6

def register():
    bpy.app.handlers.frame_change_post.append(my_handler)

def unregister():
    bpy.app.handlers.frame_change_post.remove(my_handler)