2016-11-05 35 views
-1

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窗口和螺絲了。

+3

可能的複製|點擊一個Div按鈕|瀏覽器](http://stackoverflow.com/questions/40436811/autoit-click-on-a-div-button-browser) – Samoth

+2

現在停止發佈您的答案一遍又一遍。如有需要,您可以編輯您的答案。 – Samoth

+1

您的鏈接重定向到「http://127.0.0.1:8080/」 - 這是您計算機上的本地http服務器,所以其他人無法幫助您完成此操作。 – Samoth

回答

0

我終於可以單擊「不可點擊菜單項」使用下面的代碼:

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