This is the VB script I used in v3.5, but does not work anymore in v4.
ToggleValue "xrayshaded", "*.*.*.camdisp"
I would also like to know how to translate this one to JScript. AND, is there a hidden JScripting documentation? I swear I once heard Michael Isner, or someone of similar power, state that version 4 would have more documentation using JScripting.