Rei10 Posted January 9, 2020 Posted January 9, 2020 (edited) expandcollapse popup$sUrl = 'https://sait.com' Local $oIE = _IECreate ($sUrl, 1) _IELoadWait($oIE) $sClassName = 'input' $oLink = _IEGetObjByClass ($oIE, $sClassName) $kod_f = 'tyu' $oCode = _IEGetObjById($oLink, $kod_f) _IEFormElementSetValue($oCode, 'good') ;_IEAction($oLink, "click") Func _IEGetObjByClass(ByRef $o_object, $s_Class, $i_index = 0); If Not IsObj($o_object) Then __IEErrorNotify("Error", "_IEGetObjByClass", "$_IEStatus_InvalidDataType") SetError($_IEStatus_InvalidDataType, 1) Return 0 EndIf ; If Not __IEIsObjType($o_object, "browserdom") Then __IEErrorNotify("Error", "_IEGetObjByClass", "$_IEStatus_InvalidObjectType") SetError($_IEStatus_InvalidObjectType, 1) Return 0 EndIf ; Local $i_found = 0 ; $o_tags = _IETagNameAllGetCollection($o_object) For $o_tag In $o_tags If String($o_tag.className) = $s_Class Then If ($i_found = $i_index) Then SetError($_IEStatus_Success) Return $o_tag Else $i_found += 1 EndIf EndIf Next ; __IEErrorNotify("Warning", "_IEGetObjByClass", "$_IEStatus_NoMatch", $s_Class) SetError($_IEStatus_NoMatch, 2) Return 0 EndFunc ;==>_IEGetObjByClass By id number, the value is not set. Edited January 9, 2020 by Rei10
Developers Jos Posted January 9, 2020 Developers Posted January 9, 2020 Which part of this post in the previous closed thread did you not understand? : The forum rules explicitly state : Quote 7. Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above. Consider this your final warning! Jos 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.
Recommended Posts