Can you please help me?
I am trying to port a VB application to PB/WIN 9.01 that reads the names and values of the various controls on a web page displayed by a certain instance of the Internet Explorer. Despite studying the manual/forum messages/code generated by the PB COM Browser I did not succeed so far.
Here is the "core element" of the VB code I am trying to translate:
Any help would be greatly appreciated!
Regards
Heinz Salomon
I am trying to port a VB application to PB/WIN 9.01 that reads the names and values of the various controls on a web page displayed by a certain instance of the Internet Explorer. Despite studying the manual/forum messages/code generated by the PB COM Browser I did not succeed so far.
Here is the "core element" of the VB code I am trying to translate:
Code:
Public Sub EnumInputElements(rtSearchUrl As String) Dim tUrl As String Dim objShellWins As SHDocVw.ShellWindows Dim objIE As SHDocVw.InternetExplorer Dim objDoc As MSHTML.HTMLDocument Dim objInputElement As Object Set objShellWins = New SHDocVw.ShellWindows For Each objIE In objShellWins tUrl = objIE.LocationURL If Len(tUrl) Then If InStr(1, objIE.LocationURL, rtSearchUrl, vbTextCompare) Then Set objDoc = objIE.document Open Environ$("USERPROFILE") & "\Desktop\InputElements.txt" For Output As #1 For Each objInputElement In objDoc.Forms(objDoc.Forms.length - 1).elements If Len(objInputElement.id) Then Print #1, objInputElement.id; ";"; objInputElement.Value End If Next Close #1 End If End If Next End Sub
Regards
Heinz Salomon
Comment