What seems to work too is to move the entire line 308 like this :
; Create a Windows Media Player object embedded in Internet Explorer
Global $IEControl, $oIE = MyWMPlayer()
; Global $oPlayer = _IEGetObjById($oIE, "objWMPlayer") ; <=== move this line 308...
and place it here, after the @SW_HIDE / @SW_SHOW trick (if you place it before it doesn't work) :
GUISetState(@SW_HIDE, $winMain) ; without these 2 lines of code, the $winMain is randomly minimized
GUISetState(@SW_SHOW, $winMain) ; when the "Close" box of $winListView is clicked
WinSetTitle($winMain, "", "zPlayer by C. Y. Cho") ; caption of $winMain sometimes synchronizes to that of $winListView
Global $oPlayer = _IEGetObjById($oIE, "objWMPlayer") ; <========= line 308 moved here
Main()
Func Main()
$oPlayer.Settings.Volume = $nVolume
$oPlayer.Settings.autoStart = True
$oPlayer.uiMode = "none"