WinApi
https://hotkeyit.github.io/v2/docs/commands/WinApi.htm
Note: it is big enough that it slows down iWB2 Learner.
I opened it and put it into an HTMLFile object to retrieve information from it. Applying getElementsByTagName once returned 0, the same operation again gave the correct value. Oddly it only gave the correct value a second time if I used MsgBox. A long Sleep delay did not seem to work, nor did a loop repeating getElementsByTagName without using the MsgBox.
Code: Select all
q:: ;get dll function info from WinApi.htm
;WinApi
;https://hotkeyit.github.io/v2/docs/commands/WinApi.htm
vPath = %A_ScriptDir%\Help\WinApi.htm
oHTML := ComObjCreate("HTMLFile")
FileRead, vHtml, % vPath
oHTML.write(vHtml)
;didn't work:
if 0
{
ToolTip, LOADING
Loop
{
if (oHTML.getElementsByTagName("tbody").length = 28)
break
Sleep 10
}
ToolTip, READY
Sleep 1000
ToolTip
}
;if use MsgBox, it seems to work:
MsgBox, % oHTML.getElementsByTagName("tbody").length
MsgBox, % oHTML.getElementsByTagName("tbody").length
MsgBox, % oHTML.getElementsByTagName("tr").length
vOutput := ""
VarSetCapacity(vOutput, 1000000*2)
Loop, % oHTML.getElementsByTagName("tbody").length
{
if (A_Index = 1)
continue
vDll := oHTML.getElementsByTagName("h2")[A_Index-2].innerText
oElt := oHTML.getElementsByTagName("tbody")[A_Index-1]
if (SubStr(vDll, StrLen(vTemp)+1-4) = ".dll")
vDll := SubStr(vDll, 1, -4)
Loop, % oElt.getElementsByTagName("tr").length
{
oElt2 := oElt.getElementsByTagName("tr")[A_Index-1]
vOutput .= vDll "\" oElt2.all[2].all[0].innerText "=" oElt2.all[0].innerText "`r`n"
}
}
Clipboard := vOutput
oHTML := ""
MsgBox, % "done"
return
[800th post!]