Page 1 of 1

Finding number in IE table

Posted: 07 May 2018, 11:51
by Trigg
Good afternoon,

I am trying to find a specific extension in a table on a webpage. If the loop finds that number, it will loop ( Var + 1 ) until the variable doesn't exist. It is stuck in a loop and I cannot figure out if there is a better way to find a value in a table via IE.

<td class="sortCol">Extension</td>
Extension number: <td class="fieldleft" bgcolor="#eaecef">1466</td>

Code: Select all


IniRead, Ext, Extension.ini, Extension, Extension

ComObjError(False)

Loop	{
	Value := ""
	While ( Value <> Ext )                                                                               
		Value := wb.document.getElementsByTagName("td")[ A_Index-1].innerText, index := A_Index-1

	If ( Value = Ext )
		Ext := Ext + 1
	Else
		Break
		}

MsgBox % Ext