0
버튼을 클릭하는 데 문제가있었습니다. 나는 지난 5 시간 동안 문제를 고치려고 노력했고 마침내 여기에 묻기로 결심했다.AutoIT | 브라우저 | 버튼을 클릭하십시오.
클릭하려고하는 버튼을 "좋아요"라고합니다. 여기 코드의 엉덩이에 있습니다.
코드에 무슨 문제가 있습니까?
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <ie.au3>
#include <MsgBoxConstants.au3>
#include <GuiEdit.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("KingDomLikes Bot", 334, 150, 192, 124)
$Group1 = GUICtrlCreateGroup("Login", 0, 0, 137, 145)
$username = GUICtrlCreateInput("Username", 8, 32, 121, 21)
$password = GUICtrlCreateInput("Password", 8, 64, 121, 21)
$Login1 = GUICtrlCreateButton("Login", 8, 96, 123, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("", 144, 0, 185, 145)
$repeat = GUICtrlCreateInput("0", 152, 32, 121, 21)
$Label1 = GUICtrlCreateLabel("Loop", 152, 16, 28, 17)
$start = GUICtrlCreateButton("Start", 152, 64, 163, 73)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
logintosite()
Func logintosite()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Login1
Global $oIE = _IECreate("http://addmefast.com/")
$username1 = GUICtrlRead($username)
$password1 = GUICtrlRead($password)
$emailform = _IEGetObjByName($oIE, "email")
$usernameform = _IEGetObjByName($oIE, "password")
$buttonweb = _IEGetObjByName($oIE, "login_button")
_IEFormElementSetValue($emailform, $username1)
_IEFormElementSetValue($usernameform, $password1)
_IEAction($buttonweb, "click")
Case $start
_IENavigate($oIE, "http://addmefast.com/free_points/youtube_likes")
sleep(2000)
For $i = 1 To $repeat
_IET ($oIE, "Like")
Next
EndSwitch
WEnd
EndFunc
나는 웹에서 찾은 여러 가지 솔루션을 시도했지만 그 중 실제로 아무 것도 시도하지 못했습니다.
쓸모없는 태그'로깅/login'를 제거하십시오, 또는 적어도 사용중인 실제 프로그래밍 언어 또는 시스템에 대한 관련 태그를 추가하십시오. –
팁 주셔서 감사합니다. 일부 태그를 추가했습니다. –