|
发表于 2010-10-20 04:34:05
|
显示全部楼层
#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 |
|