如何自动搜索网页中的文字并点击它
比如http://www.163.com 打开这个网站 想搜索"新闻"这2个字,搜索到后自动点击它,请问怎么实现啊谢谢大家 $oIE = _IECreate ("http://www.163.com",0,1,0)_IELinkClickByText($oIE,'新闻') 2 楼代码不全,我记得还要加上个IE.au3 #include <IE.au3> #include <IE.au3>
$oIE = _IE_Example ("basic")
_IELinkClickByText ($oIE, "user forum")
; *******************************************************
; Example 2 - Open browser to the AutoIt homepage, loop through the links
; on the page and click on the link with text "wallpaper"
; using a sub-string match.
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate("http://www.autoitscript.com")
$sMyString = "wallpaper"
$oLinks = _IELinkGetCollection($oIE)
For $oLink in $oLinks
$sLinkText = _IEPropertyGet($oLink, "innerText")
If StringInStr($sLinkText, $sMyString) Then
_IEAction($oLink, "click")
ExitLoop
EndIf
Next 回复 5# qq123123
测试完毕:
第1个例子没反应,第2个OK.
页:
[1]