Couldn't find any MIDI-window related but there is "Dock/undock currently focused window". Maybe it's possible to use ControlFocus
http://www.autohotkey.com/docs/comma...ntrolFocus.htm to set MIDI-window (or control) focused and then use Dock/undock -action.