well the solution is very simple. I was fooling arround with MEL and then it is written in the manual that when you open the script editor en go to <Edit>-<Echo all command> then maya will show you everything it does, every command ! So when you then adjust the shade and x-ray stuff it will show you how it does it.
So what you do then is copy and past it in to a new script and you are done !
But you have to do this for each window first because each view has a different script number !
Echo all command is also an excellent way to learn how to script with mel !
The Important Thing is NOT to Stop Questioning.
--- Albert Einstein ---
www.ProtheusWorld.tk