MEL Querying a selected button
<p>I am new to using MEL to write scripts. 
I have two radio buttons, one and two. When radio button 'two' is selected, I want the script to select the two cube objects I have created in my scene (cube1 and cube2), so that when I use my 'rotate' button (a regular push button), both of the cubes rotate.</p>

<p>On the other hand, if the radio button 'one' is selected, then only one of them (cube1) should rotate when I press the rotate button.</p>

<p>I have my radio buttons as follows:</p>

<pre><code>  $radio1 = `radioCollection`;          
                        //my radio buttons
                        $one  = `radioButton -label "1 cube"`;
                        $two = `radioButton -label "2 cubes"`; 

radioCollection -edit -select $one $radio1; //so that this one is selected by default
</code></pre>

<p>and for the rotate button I have this that rotates the cube object 'cube1' by 30 degrees. This is currently NOT linked to my radio buttons.</p>

<pre><code>button -label "rotate" -command "setAttr cube1.rotateZ `floatSliderGrp -q -value 30.0`";
</code></pre>

<p>Thoughts? Should I query the radio button's state? This would be so much easier for me in another language! I could see myself saying something like <em>"if $radiotwo.pressed, then cube1.rotateZ &amp;&amp; cube2.rotateZ"</em></p>