#include-once #include #include #include ;=================================================================================================== ; Function: _GUICtrl_CreateWMPlayer ; Purpose: Embed Windows Media Player and play one file or one playlist only. ; Notes: PARAM NAME="url" is ReadOnly ; Authors: squirrely1 ; borderless IE embed example: GaryFrost ; Kudos - Kåre Johansson, CFire ; References: ; http://msdn2.microsoft.com/en-us/library/ms930698.aspx ; http://www.w3schools.com/media/media_playerref.asp ; clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6 - wmplayer latest installed version ; clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 - wmp 6.4 ;=================================================================================================== Func _GUICtrl_CreateWMPlayer($movieURL, $playerLeft, $playerTop, $playerWidth, $playerHeight, _ $insetBorders = 0, $fullscreenMode = False, $showControls = False, $enableContextMenu = True, _ $LoopMode = True, $playCount = 1, $playVolume = 100, $playBalance = 0, $enableFullScreenControls = True) If $fullscreenMode Then $fullscreenMode = "true" Else $fullscreenMode = "false" EndIf If $showControls Then $showControls = "true" Else $showControls = "false" EndIf If $enableContextMenu Then $enableContextMenu = "true" Else $enableContextMenu = "false" EndIf If $LoopMode Then $playCount = 999 EndIf If $enableFullScreenControls Then $enableFullScreenControls = "true" Else $enableFullScreenControls = "false" EndIf Local $myIE_Obj = _IECreateEmbedded () Local $GUIActiveX = GUICtrlCreateObj($myIE_Obj, $playerLeft, $playerTop, $playerWidth, $playerHeight) _IENavigate($myIE_Obj, "about:blank") Local $htmlWMP $htmlWMP = '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _ & @CR & '' _IEDocWriteHTML ($myIE_Obj, $htmlWMP) _IEAction ($myIE_Obj, "refresh") $myIE_Obj.document.body.scroll = "no" $myIE_Obj.document.body.style.border = $insetBorders Return $myIE_Obj EndFunc ;==>_GUICtrl_CreateWMPlayer