AutoIT - 不点击

时间:2016-11-05 11:24:30

标签: click autoit

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窗口并搞砸了。

1 个答案:

答案 0 :(得分:0)

我终于可以使用以下代码点击“无法点击的菜单条目”:

Func _IEMyFullClick($oElement)
    ;Function to perform full click
    $oElement.fireEvent("onmousedown")
    $oElement.fireEvent("onmouseup")
    _IEAction($oElement, "click")
EndFunc