using a listbox to control webbrowser functions I NEED HELP
ok i need to know how to make the webbrowser control goto a certian website then when its at that website stay there untill the user hits a button on the webbrowser control like for example
if i load the list with usernames and want the webbrowser to goto their webpage then wait for me to hit a certian button on the webbrowser then change to the next webpage and so on
i can get it to goto the webpage using a timer but how do i make it stop at the page and wait untill a certian button is pressed?
i know i use this to goto the webpage using the listbox
Code:
Browser.Navigate ("http://WebSiteName.com" & List1.Text)
but i i need it to goto the webpage and not scroll to the nextpage untill im finish
this is what i have so far it is in a timer
Code:
Browser.Navigate ("http://WebSiteName.com" & List1.Text)
If Browser.LocationURL = ("http://WebSiteName.com" & List1.Text) Then
List1.ListIndex = List1.ListIndex + 1
End If
Re: using a listbox to control webbrowser functions I NEED HELP
do i not use a timer? or do i use the webbrowser it self? i am confused at this point should i put a pause function in it or what
Re: using a listbox to control webbrowser functions I NEED HELP
try like
vb Code:
Browser.Navigate ("http://WebSiteName.com" & List1.Text)
do until browser.readystate = 4
doevents
loop
' page loaded do more stuff
Re: using a listbox to control webbrowser functions I NEED HELP
how would i use that with a listbox?
i get it will goto the item in the listbox but after its done how do i get it to goto the next item?
Re: using a listbox to control webbrowser functions I NEED HELP
where it says do more stuff, navigate to the next listbox item as you did in your previous posting
or in a loop like
vb Code:
for i = 0 to listbox1.listcount - 1
wb.navigate2 listbox1.list(i)
do until wb.readystate = 4
doevents
loop
next
Re: using a listbox to control webbrowser functions I NEED HELP
how would i make it click a button after it goes to the page? i got the code to click the button but it errors out
Re: using a listbox to control webbrowser functions I NEED HELP
which page?
as soon as the page loads it goes to the next, so you would get error
as i don't know the source i can only guess at clicking the button
wb.document.forms(0).submit
Re: using a listbox to control webbrowser functions I NEED HELP
how would i make it wait till i the button is clicked to go on to the next page? thats what i ment .... i know how to click the button but after i click it i need it to wait untill the next page loads then goto the next url in the listbox
Re: using a listbox to control webbrowser functions I NEED HELP
click the button code goes between loop and next
you probably need to loop again, after clicking the button, until the readystate = readystatecomplete (4), otherwise it will immediately start loading the next url in the listbox
Re: using a listbox to control webbrowser functions I NEED HELP
what am i doing wrong?
Code:
For i = 0 To LisT.ListCount - 1
BrowSerA.Navigate2 "http://url.com& LisT.LisT(i)
Do Until BrowSerA.ReadyState = 4
DoEvents
Loop
For X = 0 To LisT.ListCount
do untill browsera.ReadyState = 1
DoEvents
BrowSerA.Document.All("button name").Click
Loop
Next
on the second do untill i get a syntax error
Re: using a listbox to control webbrowser functions I NEED HELP
try like
vb Code:
For i = 0 To LisT.ListCount - 1
BrowSerA.Navigate2 "http://url.com& LisT.LisT(i)
Do Until BrowSerA.ReadyState = 4
DoEvents
Loop
BrowSerA.Document.All("button name").Click
do untill browsera.ReadyState = 4
DoEvents
Loop
Next
use option explicit at the top of your code window
Re: using a listbox to control webbrowser functions I NEED HELP
i still get a syntax error
what am i doing wrong?
Code:
Dim i As Integer
For i = 0 To LisT.ListCount - 1
BrowSerA.Navigate2 "http://url.com& LisT.LisT(i)"
Do Until BrowSerA.ReadyState = 4
DoEvents
Loop
BrowSerA.Document.All("button name").Click
do untill browsera.ReadyState = 4
DoEvents
Loop
Next
Re: using a listbox to control webbrowser functions I NEED HELP
i get a syntax error on the second
Code:
do untill browsera.readystate = 4
why is that?
Re: using a listbox to control webbrowser functions I NEED HELP