Kard0 Posted August 12, 2010 Share Posted August 12, 2010 Today, I ran into some trouble finding form ID-s to enter data in, it just doesn't seem to find the form info. expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <IE.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("PixPlay Bot", 548, 559, 931, 281) $MenuItem1 = GUICtrlCreateMenu("&Menüü") $MenuItem2 = GUICtrlCreateMenuItem("Programmist", $MenuItem1) $MenuItem3 = GUICtrlCreateMenuItem("Koduleht", $MenuItem1) $MenuItem4 = GUICtrlCreateMenuItem("Välju", $MenuItem1) $Label1 = GUICtrlCreateLabel("Kasutajanimi:", 32, 48, 66, 17) $Label2 = GUICtrlCreateLabel("Parool:", 56, 72, 37, 17) GUICtrlCreateInput("", 96, 48, 121, 21) GUICtrlCreateInput("", 96, 72, 121, 21) $Radio1 = GUICtrlCreateRadio("Käsitöö", 80, 104, 121, 25) $Radio2 = GUICtrlCreateRadio("Sõiduoskus", 80, 128, 81, 17) $Button1 = GUICtrlCreateButton("Alusta!", 240, 160, 75, 25, $WS_GROUP) $Combo1 = GUICtrlCreateCombo("Rajavalik", 168, 128, 145, 25) $oIE=_IECreateEmbedded () $Object=GuiCtrlCreateObj($oIE,10,200,520,300) GUICtrlSetData(-1, "Kaheksa|Two Slide|High Speed") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $Button1 _IENavigate ($oIE, "http://www.pixplay.net/sites.php?to=login") algusnupp() Case $nMsg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Func algusnupp() Sleep(2000) $oForm = _IEFormGetObjByName ($oIE, "") $oQuery = _IEFormElementGetObjByName ($oForm, "name") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) EndFunc This returns: --> IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormSubmit, $_IEStatus_InvalidDataType The form info finder that I found on this forum shows me this: Forms Info: There are 1 forms on this page Form Info: .name = Elements Info: There are 3 elements in this form Element Info: .name = name .id = name Element Info: .name = pass .id = pass #include <IE.au3> $sURL = "http://www.pixplay.net/sites.php?to=login" $oIE = _IECreate($sURL) $oForms = _IEFormGetCollection($oIE) ConsoleWrite("Forms Info: There are " & @extended & " forms on this page" & @LF) For $oForm In $oForms ConsoleWrite(@TAB & "Form Info: .name = " & $oForm.name & @LF) $oElements = _IEFormElementGetCollection($oForm) ConsoleWrite(@TAB & "Elements Info: There are " & @extended & " elements in this form" & @LF) For $oElement In $oElements ConsoleWrite(@TAB & @TAB & "Element Info: .name = " & $oElement.name & " .id = " & $oElement.id & @LF) Next Next What might be the problem, that it just doesn't want to find the place and enter data into it. Link to comment Share on other sites More sharing options...
FlyinRiz Posted August 12, 2010 Share Posted August 12, 2010 Be careful...this looks like it's a multiplayer web based game. If it is, you should really check out the Annoucement at the top of the forum...If a game's EULA or TOS explicitly mention bots are not allowed, discussing ways to automate that game is not allowed here. Likewise, if a game features an online multiplayer component and you are attempting to automate it, discussion of such bots is not allowed here. If you create a thread to automate a game you need to make sure the game doesn't explicitly forbid it and that it does not feature multiplayer. Any game bot related thread may be closed for any reason. Repeatedly creating threads if your previous thread was closed will result in your removal from the site. Particularly egregious threads that clearly flaunt this announcement will be met with your removal from this site.Play it safe, don't discuss game bots here.-Aaron Link to comment Share on other sites More sharing options...
Developers Jos Posted August 12, 2010 Developers Share Posted August 12, 2010 *click* SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts