473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

automatically post data & click buttons on sequence of web pages with AxWebBrowser

automatically post data & click buttons on sequence of web pages with
AxWebBrowser

Hi, I need to post stuff everyday to a website and am working on a VB
program to do this for me. I am a computer technician and I post an ad
on craigslist.org everyday but sometimes I don't have time to do this.

So, I accomplished so far to load the first page and post my ad in the
textbox, with title and email address, and to alter the radio button
and to click the submit button. But when the next page loads, my code
to press on the submit button on that page generates an error "An
unhandled exception has occured in your application... Press Continue
or Quit".
All I have in my program is the main form with a web browser control,
then the code in the AxWebBrowser1_Enter subroutine. Here it is:

Private Sub AxWebBrowser1_Enter(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles AxWebBrowser1.Enter

AxWebBrowser1.Navigate("http://post.craigslist.org/nyc/B/cps/mnh")
Do While AxWebBrowser1.Busy 'wait until the page loads by looping
Application.DoEvents()
Loop
AxWebBrowser1.Document.forms(0).All("FromEMail").v alue = "xx*@yyy.com"
AxWebBrowser1.Document.forms(0).All("PostingTitle" ).value = "text text
text"
AxWebBrowser1.Document.forms(0).All("PostingBody") .value = "lets get
to business"
'AxWebBrowser1.Document.forms(0).All("previewForm" ).value = "yeah"
AxWebBrowser1.Document.forms(0).All("previewForm") .click()
Do While AxWebBrowser1.Busy 'wait until the page loads by looping
Application.DoEvents()
Loop
AxWebBrowser1.Document.forms(0).All("finishForm"). click()

End Sub

I guess it is a problem with that second DoEvents loop. I guess the
problem can be summarized thusly: how to handle the loading of the
page and click a submit button on a sequence of web pages.

Please advise.
Nov 22 '05 #1
0 2047

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Nomen Nescio | last post by:
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to http://www.mysolution.ws/insertHYPOCRITES.php for the most...
4
by: TF | last post by:
hi, i am using AxWebBrowser control in my C# dot.net windows application. i want to display a web page in the browser that needs some data sent to it through HTML Form 'POST' method. I saw a...
0
by: sophocles the wise | last post by:
automatically post data & click buttons on sequence of web pages with AxWebBrowser Hi, I need to post stuff everyday to a website and am working on a VB program to do this for me. I am a...
2
by: kma | last post by:
I am designing an Access 2000 database on a computer running Windows 98. I have one form with several tabs; all of which have sub forms, some with a subform on a subform. For example, on my...
0
by: Tom Houston via .NET 247 | last post by:
I have built vb.net application that runs on my SBS2003 thatconsists of 20 plus form and menus. I am having problems with aweb form using textboxes. There are also three buttons,back/exit/save. The...
0
by: Tonio Tanzi | last post by:
I have some asp pages with a multipart form (for file uploading), some text inputs and some submit buttons duplicated on the top and bottom of pages. If I insert into a text box a text from...
5
nmm32
by: nmm32 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. I have another procedure which adds another row to the...
0
by: cms3023 | last post by:
I have a DataGrid which displays data with the aid of a procedure. I have tested the procedure inside the database and it is working fine. The table inside the database has data that matches with...
4
by: =?Utf-8?B?RGF2ZSBF?= | last post by:
I have written an application that reads third party web pages. If I am using HTTP everything works fine. I create an AxSHDocVw.AxWebBrowser object and then Navigate2 to the page. I then...
2
by: Michael | last post by:
Hi experts, I am using axWebBrowser in windows form to load web pages. There is a page that contains a group of buttons. (More than 10 buttons.) The source code behind each button is like below:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.