You are right about the -q flag, simply use it with -v or -sl to get the result, however, you will need to know the name of the optionMenu to be able to do this. To get around this, name it yourself.
optionMenu -label "Attributes" TestMenu;
The above one forces the name to be TestMenu, so to get it's value use,
optionMenu -q -v TestMenu;
or you can get the value as a string by using the -sl flag.
optionMenu -q -sl TestMenu;
I hope this helps,
Richard
----------------------------------------------
Richard Cheek
https://www.freelance-animation.com
----------------------------------------------