|
本帖最后由 aqtd 于 2014-5-5 14:01 编辑
一个在线视频如果把internet安全级别提到最高,就能拖动进度条,我想修改internet安全级别,用改注册表的方法修改后,还是不能拖进度条。不知用什么方法可行
于是用模拟点击,可是调用 ShellExecute('control.exe', 'INETCPL.CPL,,1') 修改最高后,把进度条拖了以后,又要把安全级别改回来。再运行ShellExecute('control.exe', 'INETCPL.CPL,,1') ,就不出来交互框了。
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("学习", 553, 333, 192, 124)
$Label1 = GUICtrlCreateLabel("学习!", 136, 16, 304, 33)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
$Group1 = GUICtrlCreateGroup("操作步骤", 16, 51, 521, 209)
$Label2 = GUICtrlCreateLabel("1、点击<打开网站>按键,登陆进入在线学习画面。", 40, 75, 380, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("2、点击<我要拖进度条>按键,等到设置完成。", 40, 104, 335, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("3、拖动视频画面的进度条,想怎么拖都行。", 40, 134, 317, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("注意不要拖到尽头,留下几分钟,你还是听一听哈。", 40, 163, 372, 22)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label6 = GUICtrlCreateLabel("4、为了顺利进行下一章学习,你是不是要点击<恢复设置>。", 40, 193, 431, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label7 = GUICtrlCreateLabel("5、进入下一章后重复上面的步骤,你会觉得快得有些不习惯哈。", 40, 222, 461, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("打开网站", 24, 275, 105, 41)
$Button2 = GUICtrlCreateButton("我 要 拖 进 度 条", 164, 275, 225, 41)
$Button3 = GUICtrlCreateButton("恢复设置", 424, 275, 105, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
open()
Case $Button2
hight()
Case $Button3
mmm()
EndSwitch
WEnd
Func open()
Run(@ProgramFilesDir&"\Internet Explorer\IEXPLORE.exe http://cq.chinahrt.com/")
EndFunc
Func hight()
ShellExecute('control.exe', 'INETCPL.CPL,,1')
;Run("control.exe INETCPL.CPL,,1")
WinWait("Internet 属性")
WinActivate("Internet 属性")
ControlClick("Internet 属性","","[CLASS:Button; INSTANCE:4]")
WinWait("安全设置 - Internet 区域")
WinActivate("安全设置 - Internet 区域")
ControlCommand("安全设置 - Internet 区域","","ComboBox1","SelectString", '高')
ControlClick("安全设置 - Internet 区域","","Button3")
WinWait("警告!","确实要更改该区域的设置吗?")
WinActivate("警告!","确实要更改该区域的设置吗?")
ControlClick("警告!","确实要更改该区域的设置吗?","Button1")
WinWait("安全设置 - Internet 区域")
WinActivate("安全设置 - Internet 区域")
ControlClick("安全设置 - Internet 区域","","Button4")
WinWait("Internet 属性","安全")
WinActivate("Internet 属性","安全")
ControlClick("Internet 属性","安全","Button9")
Sleep(100)
ControlClick("Internet 属性","安全","Button7")
MsgBox(0,"提示","现在去拖动进度条吧!")
EndFunc
Func mmm()
ShellExecute('control.exe', 'INETCPL.CPL,,1')
;Run("control.exe INETCPL.CPL,,1")
WinWait("Internet 属性","安全")
WinActivate("Internet 属性","安全")
ControlClick("Internet 属性","安全","Button5")
ControlClick("Internet 属性","安全","Button9")
ControlClick("Internet 属性","安全","Button7")
EndFunc |
|