找回密码
 加入
搜索
查看: 8987|回复: 16

[IE类操作] 请问如何用au3控制ie访问,只让用户访问一个特定的网址?

 火.. [复制链接]
发表于 2011-11-25 07:59:33 | 显示全部楼层 |阅读模式
请问如何用au3控制ie访问,只让用户访问一个特定的网址?

例如我只想让用户访问qq.com的内容,其他的网站都不能访问?

查询了很多资料都没有找到,求高手解答,万分感谢
发表于 2011-11-25 08:22:51 | 显示全部楼层
#Include <WinINet.au3>
_WinINet_PrivacySetZonePreference????
 楼主| 发表于 2011-11-25 12:48:22 | 显示全部楼层
回复 2# netegg

老大,我新手一个,能不能给个完整点的代码?谢谢,简单的就成,感谢
发表于 2011-11-25 15:21:21 | 显示全部楼层
回复 2# netegg

我的autoit help里没有找到这个...
 楼主| 发表于 2011-11-25 15:27:10 | 显示全部楼层
我也是,完全没有找到
发表于 2011-11-25 16:24:44 | 显示全部楼层
回复 2# netegg
在UserInclude里面有
发表于 2011-11-25 16:25:12 | 显示全部楼层
回复 5# mtvtop
在UserInclude里面有
 楼主| 发表于 2011-11-25 17:13:16 | 显示全部楼层
回复 7# xms77

UserInclude 我在帮助里还是没有搜索到!
哪位大神能不能直接发个代码学习一下,谢谢
 楼主| 发表于 2011-11-25 23:07:39 | 显示全部楼层
求高手帮助,谢谢
 楼主| 发表于 2011-11-28 21:41:15 | 显示全部楼层
求高手帮助,谢谢
发表于 2011-12-4 10:06:15 | 显示全部楼层
#include <IE.au3>

HotKeySet("{F2}","OpenIE") ;加的系统热键F2

While 1
     Sleep(100)
WEnd

Func OpenIE()
        ShellExecute ("Firefox.exe", "www.baidu.com")  ;指定火狐浏览器来打开网页

        _IECreate ( "about:blank" , 0 ,  1 ,  1 ,  1 ) ;正常用IE打开的
       
EndFunc
 楼主| 发表于 2011-12-4 22:28:52 | 显示全部楼层
回复 11# kyann1

这个好像无法限制其他网址,我输入其他网址还是能访问,我们希望实现无法访问指定网址以外的网址
发表于 2011-12-5 23:21:13 | 显示全部楼层
回复 你指定的网址都有什么 12# mtvtop
发表于 2011-12-6 13:37:40 | 显示全部楼层
内容审查程序通过注册表可以完成
之前工作要求限制某个网站不能登录,可以登录其他网站,和楼主的要求恰恰相反
你看的修改下注册表项吧
$file = @ScriptDir&"\list.ini"
$n = IniReadSection($file,"list")
For $1 = 1 To $n[0][0]

$reg1=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings"
RegWrite($reg1,"Hint","REG_SZ","11111")
RegWrite($reg1,"FileName0","REG_SZ","C:\\WINDOWS\\system32\\icrav03.rat")
RegWrite($reg1,"Key","REG_BINARY","0xF2295D433951241D858296F93F9981FC")

$reg2=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\.Default"
RegWrite($reg2,"Allow_Unknowns","REG_DWORD","00000001")
RegWrite($reg2,"Enabled","REG_DWORD","00000001")
RegWrite($reg2,"PleaseMom","REG_DWORD","00000000")

$reg3=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\.Default\http://www.icra.org/pics/vocabularyv03/"
RegWrite($reg3,"c","REG_DWORD","00000000")
RegWrite($reg3,"oh","REG_DWORD","00000000")
RegWrite($reg3,"og","REG_DWORD","00000000")
RegWrite($reg3,"of","REG_DWORD","00000000")
RegWrite($reg3,"oe","REG_DWORD","00000000")
RegWrite($reg3,"od","REG_DWORD","00000000")
RegWrite($reg3,"oc","REG_DWORD","00000000")
RegWrite($reg3,"ob","REG_DWORD","00000000")
RegWrite($reg3,"oa","REG_DWORD","00000000")
RegWrite($reg3,"l","REG_DWORD","00000000")
RegWrite($reg3,"v","REG_DWORD","00000000")
RegWrite($reg3,"s","REG_DWORD","00000000")
RegWrite($reg3,"n","REG_DWORD","00000000")

$reg4=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules"
RegWrite($reg4)

$reg5=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default"
RegWrite($reg5)

$reg6=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0"
RegWrite($reg6,"dwFlags","REG_DWORD","00000000")
RegWrite($reg6,"errLine","REG_DWORD","00000000")

$reg7=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy"
RegWrite($reg7,"PRNumPolicy","REG_DWORD","00000001")

$reg8=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\0"
RegWrite($reg8,"PRPPolicyAttribute","REG_DWORD","00000001")

$reg9=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\0\PRPPolicySub"
RegWrite($reg9,"PRNumURLExpressions","REG_DWORD","00000001")

$reg10=$n[$1][0]&"\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\0\PRPPolicySub\0"
RegWrite($reg10,"PRBUInternetPattern","REG_DWORD","1")
RegWrite($reg10,"PRBUNonWild","REG_DWORD","29")
RegWrite($reg10,"PRBUSpecified","REG_DWORD","31")
RegWrite($reg10,"PRBUScheme","REG_SZ","http")
RegWrite($reg10,"PRBUHost","REG_SZ","ap12mf02")
RegWrite($reg10,"PRBUPort","REG_SZ","80")
RegWrite($reg10,"PRBUPath","REG_SZ","/index.asp")
RegWrite($reg10,"PRBUUrl","REG_SZ","http://ap12mf02/index.asp")
Next
我代码是批量设置http://ap12mf02/index.asp不能访问,而可以访问其他网站,如设置该网站可以访问,修改一以下:
RegWrite($reg8,"PRPPolicyAttribute","REG_DWORD","00000002")
而要设置不能访问其他网站:修改以下:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\.Default
下创建Allow_Unknowns为0

评分

参与人数 1金钱 +30 贡献 +1 收起 理由
afan + 30 + 1

查看全部评分

 楼主| 发表于 2011-12-6 15:41:45 | 显示全部楼层
回复 14# 502762378
太感谢了,谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-15 18:19 , Processed in 0.080133 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表