Help neeeded with renderer script

Hi,

I'm a Maxscript beginner. I wanted write a script to to Disable all lights, switch to Mental Ray & and create an Ambient Occlusion material. I do this quite a bit and I thought it would be nice to script it. The problem is I can't get the script to check the current active renderer before it switches to Mental Ray. My if statement won't test true. See I wanted it do maybe do or say something else if the renderer is already set to MR. Hope this makes sense.

My Script.

mental = mental_ray_renderer()
scan = default_scanline_renderer()

if renderers.current == scan then

(
lights.enabled = false
renderers.current = mental
mental.FinalGatherEnable2 = false
meditMaterials[10].name = "AO"
meditMaterials[10].selfillumMap = Ambient_Reflective_Occlusion__3dsmax ()
meditMaterials[10].useSelfIllumColor = on
mental.Enable_Material_Override = true
mental.Override_Material = meditmaterials[10]
)

else messagebox "Error"