AutoIT没有点击“赞”按钮。
Case $start
_IENavigate($oIE, "http://kingdomlikes.com/free_points/youtube-likes")
sleep(5000)
For $i = 1 To $repeat1
Local $oInputs = _IETagNameGetCollection($oIE, "button")
For $oInput In $oInputs
If $oInput.classname == "button blue" Then _IEAction($oInput, "click")
Next
Sleep(5000)
WinActivate("YouTube - Internet Explorer")
Local $oInputs = _IETagNameGetCollection($oIE, "button")
For $oInput In $oInputs
If $oInput.classname == "yt-uix-button yt-uix-button-size-default yt-uix-button-opacity yt-uix-button-has-icon no-icon-markup like-button-renderer-like-button like-button-renderer-like-button-clicked yt-uix-button-toggled yt-uix-post-anchor yt-uix-tooltip" Then _IEAction($oInput, "click")
Sleep(1000)
Next
Next
我希望autoit在弹出的新窗口中点击“喜欢”按钮,但是autoit只会打开许多不同的youtube窗口并搞砸了。
答案 0 :(得分:0)
我终于可以使用以下代码点击“无法点击的菜单条目”:
Func _IEMyFullClick($oElement)
;Function to perform full click
$oElement.fireEvent("onmousedown")
$oElement.fireEvent("onmouseup")
_IEAction($oElement, "click")
EndFunc