Couldn't you just make MQ2 manipulate the window for you? I don't actively play much anymore, but I did load in to see what the commands would be.
To set all volume elements to zero, I think it would be:
/if (${Window[optionswindow].Child[ogp_soundrealismvaluelabel].Text.NotEqual[0 %]})
/notify optionswindow ogp_soundrealismslider newvalue 0
/if (${Window[optionswindow].Child[ogp_musicvolumevaluelabel].Text.NotEqual[0 %]})
/notify optionswindow ogp_musicvolumeslider newvalue 0
/if (${Window[optionswindow].Child[ogp_soundvolumevaluelabel].Text.NotEqual[0 %]})
/notify optionswindow ogp_soundvolumeslider newvalue 0
/if (${Window[optionswindow].Child[ogp_envsoundscheckbox].Checked})
/notify optionswindow ogp_envsoundscheckbox leftmouseup
/if (${Window[optionswindow].Child[ogp_combatmusiccheckbox].Checked})
/notify optionswindow ogp_combatmusiccheckbox leftmouseup
You could put those on a social and just hit the social to turn off the sound. You could build a second social to reset the volume values as well, depending on how high you want to set the sliders.
It looks like sliders a multiplicative by 5 and integer based, so just think of it as a 1-20 scale with increments of 5...ie newvalue 3 would set slider to 15, etc.
Your second hotkey, if you set the sound realism, music volume and sound volume to 25 would be:
/if (${Window[optionswindow].Child[ogp_soundrealismvaluelabel].Text.Equal[0 %]})
/notify optionswindow ogp_soundrealismslider newvalue 5
/if (${Window[optionswindow].Child[ogp_musicvolumevaluelabel].Text.Equal[0 %]})
/notify optionswindow ogp_musicvolumeslider newvalue 5
/if (${Window[optionswindow].Child[ogp_soundvolumevaluelabel].Text.Equal[0 %]})
/notify optionswindow ogp_soundvolumeslider newvalue 5
/if (!${Window[optionswindow].Child[ogp_envsoundscheckbox].Checked})
/notify optionswindow ogp_envsoundscheckbox leftmouseup
/if (!${Window[optionswindow].Child[ogp_combatmusiccheckbox].Checked})
/notify optionswindow ogp_combatmusiccheckbox leftmouseup