Visible should be possible, using GetToggleCommandState2:
http://mespotine.de/Ultraschall/Reap...eCommandState2
I don't have Reaper here right now, so I wrote this from memory, mostly. It should work, but if not, just follow the steps I wrote later.
Just go into the actionlist, create a new script using the NEW-button for ReaScripts.
Name the file to Show_Regionmatrix.lua. and hit Save.
Paste the following into the script-window that appears.
Code:
if reaper.GetToggleCommandState2(40251)==0 then
reaper.Main_OnCommand(40251,0)
end
Hit Cmd+S or Ctrl+S and it should work already, everytime you hit Cmd+S or Ctrl+S.
Now, the aforementioned "later steps":
If it doesn't always show the RegionMatrix, change the
Code:
if reaper.GetToggleCommandState2(40251)==0 then
to
Code:
if reaper.GetToggleCommandState2(40251)==1 then
If it works successfully, close the window.
"Active window" isn't codeable, unfortunately. But maybe, my code is sufficient enough.