|
本帖最后由 sunkiss 于 2013-9-11 11:02 编辑
以下代码失败啊~!为什么啊?不打上那个classid后面的clsid,打开的网页里面,查看源码,有代码,打上在看代码只有<html></html>我想内嵌个播放器啊,用ocx那个控件失败了,用网页嵌入也失败啊。经过不断地搜索和测试终于成功打开了,但是只有声音没图像啊。这个代码写在htm里是正常的啊。用了http://www.autoitx.com/forum.php ... D3%C6%B5&page=1这个也不行,怎么办?光有人看,没人帮忙,没办法了,视频转码吧。[code#include <IE.au3>
Dim $sHTML = ''
$sHTML &= '<HTML>' & @CR
$sHTML &= '<HEAD>' & @CR
$sHTML &= '<TITLE>超强播放器</TITLE>' & @CR
$sHTML &= '</HEAD>' & @CR
$sHTML &= '<OBJECT id="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="750" height="750" standby="Loading Windows Media Player components…" type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">' & @CR
$sHTML &= '<param name="FileName" value="D:\2.avi">' & @CR
$sHTML &= '</OBJECT>' & @CR
$sHTML &= '</HTML>'
$oIE = _IECreateEmbedded()
GUICreate('测试',500,500)
GUICtrlCreateObj($oIE,0,0,500,500)
_IENavigate($oIE,"about:blank")
_IEDocWriteHTML($oIE,$sHtml)
_IEAction($oIE,"refresh")
GUISetState()
Do
Until GUIGetMsg() = -3[/code] |
|