#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=favicon.ico
#AutoIt3Wrapper_Res_Comment=世界杯直播客户端
#AutoIt3Wrapper_Res_Description=世界杯直播客户端
#AutoIt3Wrapper_Res_Fileversion=1.0.0.3
#AutoIt3Wrapper_Res_LegalCopyright=QQ:462606
#AutoIt3Wrapper_Res_Field=ProductVersion|1.0.0.3
#AutoIt3Wrapper_Res_Field=ProductName|世界杯直播
#AutoIt3Wrapper_Res_Field=CompanyName|yoyohot
#AutoIt3Wrapper_Res_Field=LegalTrademarks|QQ:462606
#AutoIt3Wrapper_Res_Field=InternalName|世界杯直播.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <WinAPI.au3>
#Region ### START Koda GUI section ### Form=
FileInstall("yoyohot.dll", @TempDir & "\yoyohot.dll", 1)
FileInstall("yoyohot.skf", @TempDir & "\yoyohot.skf", 1)
DirCreate(@WindowsDir & "\temp\tv")
FileInstall("CCTVPlayer.ocx", "C:\WINDOWS\Temp\tv\CCTVPlayer.ocx", 1)
FileInstall("CCTVUpdateInstall.dll", "C:\WINDOWS\Temp\tv\CCTVUpdateInstall.dll", 1)
FileInstall("Reli_CCTV.dll", "C:\WINDOWS\Temp\tv\Reli_CCTV.dll", 1)
Dim $dll, $bf = (@TempDir & "\SkinCrafterDll.dll")
$Form1 = GUICreate("2010南非世界杯独家直播-新屋网络专版 作者QQ群:100218411", 517, 455)
_SkinGUI(@TempDir & "\yoyohot.dll", @TempDir & "\yoyohot.skf", $Form1)
GUISetState(@SW_SHOW)
$Group2 = GUICtrlCreateGroup("选项", 8, 392, 500, 49)
$Button1 = GUICtrlCreateButton("安装控件(&C)", 48, 408, 75, 25)
$Button2 = GUICtrlCreateButton("卸载控件(&U)", 168, 408, 75, 25)
$Button3 = GUICtrlCreateButton("刷新页面(&R)", 288, 408, 75, 25)
$Button4 = GUICtrlCreateButton("关闭播放(&X)", 408, 408, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
If Not RegRead("HKEY_CURRENT_USER\Software\Classes\ATLDownLoadProgressBar.DownLoadProgressBar", "") Then
GUICtrlSetState($Button2, $GUI_DISABLE)
Else
GUICtrlSetState($Button1, $GUI_DISABLE)
EndIf
$oIE = _IECreateEmbedded()
$web = "http://worldcup.cntv.cn/live/index.shtml?channel=cctv5"
GUICtrlCreateObj($oIE, -244, -334, 960, 710)
GUISetState()
$oIE.navigate("about:blank")
$oIE.document.body.style.border = "0"
$oIE.document.write("<body style='border:0;margin:0px'><iframe scrolling=no frameborder=0 src =" & $web & " width=100% height=100%></iframe></body>")
$oIE.refresh
$oIE.document.body.scroll = "no"
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1;安装控件
znkj()
Case $Button2;卸载控件
xzkj()
Case $Button3;刷新页面
_IEAction($oIE, "refresh")
Case $Button4
Exit
EndSwitch
WEnd
Func znkj()
ShellExecute("regsvr32.exe", "/S C:\WINDOWS\Temp\tv\CCTVUpdateInstall.dll", @SystemDir)
ShellExecute("regsvr32.exe", "/S C:\WINDOWS\Temp\tv\CCTVPlayer.ocx", @SystemDir)
ShellExecute("regsvr32.exe", "/S C:\WINDOWS\Temp\tv\Reli_CCTV.dll", @SystemDir)
TrayTip("", "正在安装控件,精彩马上开始……", 5)
Sleep(1000)
TrayTip("", "控件已安装,刷新页面中……", 5)
GUICtrlSetState($Button2, $GUI_ENABLE)
GUICtrlSetState($Button1, $GUI_DISABLE)
Sleep(5000)
_IEAction($oIE, "refresh")
TrayTip("", "控件已安装,缓冲中……", 5)
Sleep(2000)
TrayTip("清除任何托盘提示", "", 0)
EndFunc ;==>znkj
Func xzkj()
$xx = MsgBox(4164 + 16, "提示", "是否卸载播放控件")
Select
Case $xx = 6 ;Yes
ShellExecute("regsvr32.exe", "/U /S C:\WINDOWS\Temp\tv\CCTVUpdateInstall.dll", @SystemDir)
ShellExecute("regsvr32.exe", "/U /S C:\WINDOWS\Temp\tv\CCTVPlayer.ocx", @SystemDir)
ShellExecute("regsvr32.exe", "/U /S C:\WINDOWS\Temp\tv\Reli_CCTV.dll", @SystemDir)
TrayTip("", "正在卸载控件,打开播放器可重新安装……", 5)
GUICtrlSetState($Button1, $GUI_ENABLE)
GUICtrlSetState($Button2, $GUI_DISABLE)
Sleep(1000)
TrayTip("清除任何托盘提示", "", 0)
_IEAction($oIE, "refresh")
FileDelete("C:\WINDOWS\Temp\tv\CCTVUpdateInstall.dll")
FileDelete("C:\WINDOWS\Temp\tv\Reli_CCTV.dll")
FileDelete("C:\WINDOWS\Temp\tv\CCTVPlayer.ocx")
DirRemove("C:\WINDOWS\Temp\tv\ADDATA", 1)
DirRemove("C:\WINDOWS\Temp\tv\WOW", 1)
MsgBox(128 + 16, "提示", "播放控件卸载完毕!")
Exit
Case $xx = 7 ;No
EndSelect
EndFunc ;==>xzkj
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)
$dll = DllOpen($SkincrafterDll)
;=================请注意一下代码的注释!!============================
DllCall($dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1");3.1版本DLL使用这行代码
DllCall($dll, "int:cdecl", "InitLicenKeys", "wstr", "SKINCRAFTER", "wstr", "SKINCRAFTER.COM", "wstr", "support@skincrafter.com", "wstr", "DEMOSKINCRAFTERLICENCE");3.4版DLL使用这样代码
;===============以上代码只能使用其中一行!!==========================
DllCall($dll, "int:cdecl", "InitDecoration", "int", 1)
DllCall($dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin)
DllCall($dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25)
DllCall($dll, "int:cdecl", "ApplySkin")
EndFunc ;==>_SkinGUI
Func Quit()
GUISetState(@SW_HIDE)
DllCall($dll, "int:cdecl", "DeInitDecoration")
DllCall($dll, "int:cdecl", "RemoveSkin")
DllClose($dll)
Exit
EndFunc ;==>Quit
注:这不是我写的,只用来交流而已