Yep, that doesn't work in userSetup because at the point when you query for panels there aren't any created yet. For this sort of thing if you want to set up some script to be executed once Maya is finished starting up then you can use an -idleEvent scriptjob instead. Try putting this in your userSetup.mel:scriptJob…