Script for moving objects using coordinates

The image above shows the result on a lighting fixture after running the script. The text is editable (understandable), but I want to be able to controll it through those parameteres.

If I edit the text, and then re-run the script, the coordinates reset to the objects position.