You can do math!
Code:
<Button Name="WEE" Opacity="0.750" OnPress="opacity=(1-opacity)" Size="100,40" Style="/ButtonStyles.text_button_default">WEE</Button>
Makes a button that switches between 75% and 25% opacity every time you click it.
Still working on referencing other UI elements. (My test window has 6 buttons so I can do 6 tests per UI reload, might want to do something similar.)
Please use this thread to discuss UI element scripts. Use the other thread for attempts to get multi-word slash commands working.