TLM wrote:Also after the page is loaded try
Code: Select all
spanObj := pwb.document.getElementsByTagName( "span" )
While ( a_index-1 < spanObj.length )
{
if ( spanObj[ a_index-1 ].className = "_dtd _30b5" )
{
spanValue := Trim( spanObj[ a_index-1 ].innerText, " " )
}
}
msgbox % spanValue
the className property is your friend
Yea, before I figured out the RegEdit to make getElementsByClassName to work, I had used a function to loop though getElementsByTagName and look for the right ClassName. ByTagName is older and supported by even the lowest default DocumentMode.
If you are ok with adding a Register entry, you can add this line to the top of your script.
Code: Select all
RegWrite, REG_DWORD, HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
, AutoHotkey.exe, 11001
Assuming you actually have a version of IE on your computer that supports ByClassName.
It just tells Windows to always use the highest mode available up to Edge mode when AutoHotkey uses Internet Explorer.
Technically, it only needs to be run once but doesn't really do any harm to reset it.
FG