473,403 Members | 2,183 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,403 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 2050

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.