Avoid distortions when creating projector effect Im my scene, a point light is right above a table, and the light is textured to mimic a projector.

However, the projection is slightly distorted. Is there a way to solve this problem?

The script node is only for changing the colour of the texture, it does not affect how the texture is mapped.
Wanted to add an answer here since this comes up first in google: 

Between your Texture Coordinate node and your Mapping node, you should divide the X and Y parts of the normal vector by the Z part, and set the Z part to 1.



This was apparently reported as a bug in 2010, deemed expected behavior, and never fixed:

https://developer.blender.org/T22272

so thanks to the original reporter for the analysis and the solution.