In this first MEL Tip I'm going to address a common MEL question on how to open a window and be able to toggle it so that it can minimize or maximize with one hot key.
NOTE: In Maya 2017 the lsUI command was changed. Use the following instead:
string $windows[] = `lsUI -type "window"`;
for ($window in $windows)
print ($window + "\n");
For a written guide and source code go to:
http://www.tdhendrix.com/tutorial-mel-tip-001-toggling-windows/