Thats not really what he/she is asking for per say.
Javascript code:
function OnEvent_ChatWndSendMessage( oChatWnd, sMessage ) {
if ( sMessage === '/viewcam' ) {
Interop.Call( 'user32', 'SendMessageW', oChatWnd.Handle, 0x0111 /* WM_COMMAND */, 40316, 0 );
return '';
}
}