Jump to content
alias74

[Visual Basic]

Recommended Posts

Am urmatoarea problema:

----------code---------------------------

Dim i As Integer

For i = 0 To Me.brwWebBrowser.Document.links.Count

If brwWebBrowser.Document.links(i).innerHTML.StartsWith("http://xxxxxxxxxxxxx") Then

brwWebBrowser.Document.links(i).InvokeMember ("Click")

End If

Next i

-----------end code---------------------

Nu vrea sa mearga, se blocheaza la prima linie (nu la dim :) )

"Object doesn't support this property of or method"

In practica codul ar trebui sa "scaneze" link-urile de pe o pagina si daca gaseste unul care incepe cu "http://xxxxxxxxxxxxx" atunci clik pe el.

Multumesc anticipat

Link to comment
Share on other sites

Nu stiu ce proprietati si metode are WebBrowser-ul, dar cea mai buna solutie ar fi sa citesti sursa paginii (InternetOpen, Internet... APIs) si sa o parsezi. Adica, ai sursa paginii, cauti "<a" si ">" si intre ele gasesti "src=" sau src=" si ".

La for se blocheaza? Probabil nu are acea proprietate/obiect Links, sau metoda Count :-?

PS: Am Linux, nu pot testa, deci nu te pot ajuta prea mult.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...