找回密码
 加入
搜索
查看: 2763|回复: 5

[效率算法] 如何读取INI配置下URL所有字段的值!

[复制链接]
发表于 2010-8-11 08:22:35 | 显示全部楼层 |阅读模式
;#NoTrayIcon
#include <Ini.au3>;INI函数库
$URL = _IniReadSection ("c:\Ie.ini","URL")
While 1
Sleep(400)
$oShell = ObjCreate('shell.application') 
$oShellWindows = $oShell.windows 
For $Window In $oShellWindows
If StringRight($Window.FullName, 12) = 'iexplore.exe' Then                        
If StringInStr($Window.locationurl,$URL,2) Then $Window.navigate('http://www.baidu.com')
EndIf
Next
WEnd
如何读取 INI配置下URL所有网址的的值!然后监控IE栏,如果有这个网址的话自动跳转到指定的网址。用_IniReadSection读取的话,除了INI里的网址不跳转,别的都转……

还有个笨方法就是在监视URL那里写N个读取配置文件的1、2 、3、4、5……
发表于 2010-8-11 12:40:18 | 显示全部楼层
至少要贴出你的ini文件吧,然后依照此ini文件作出解释…
 楼主| 发表于 2010-8-11 18:28:23 | 显示全部楼层
回复 2# afan
[URL]
www.baidu.com
www.google.com
www.soso.com
像这样,依次往下加!
发表于 2010-8-11 18:30:36 | 显示全部楼层
试试 _IniReadSection_line()
 楼主| 发表于 2010-8-11 19:05:15 | 显示全部楼层
本帖最后由 angelink 于 2010-8-11 19:11 编辑

回复 4# afan


    把_IniReadSection 换成_IniReadSection _line?


没效果…………………………………………
 楼主| 发表于 2010-8-12 19:07:36 | 显示全部楼层
哈哈,虽然没学会这个,但学会了func、还有多进程~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-16 04:32 , Processed in 0.082293 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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