Howto Identify existing objects?

Hi
I am about to start my first attempt at scripting after beginning to learn Blender a couple of weeks ago.

I have completed a drawing that is basically a cube made of pipes with nothing but blackness around it. Other objects in the drawing include a plain to provide light and some text that will also be lightly animated.There are 3 things I want to do:

  1. script the pipe cube movement to rotate 90degrees on the x,y or z axis, wait a second until the next 90degree rotation, then repeat.

  2. script the pipe cubee colour so that as it rotates, the colour transitions to a new colour. The aim is to give the appearance that each 90 degree rotation exposes a new face with a new colour. The colours are not fixed. I am aiming to do this with the coloured plain acting as the light source. I have given the pipe cube a brilliant white colour. If I change the colour of the plain, then the pipe cube should appear to change colour, I hope. My theory is that it will be easier to change the colour of the light source than to change the colour of the pipe cube.

  3. The pipe cube is open but I want to hide the rear 3 pipe edges. The front view will only show 9 edges. I need to create something like a jet black cube that fits inside the pipe cube.

The result will be a logo that spins and changes colour.

So my immediate problem is that I don’t know how to initially identify the pipe cube object in the code. I have found lots of posts on changing the name of objects, and I will want to do that. My question is how do I initially identify the objects (pipe cube, light plain and text) to then allow them to be manipulated by the script, including changing their names.

Dazz