C# help needed.

Status
Not open for further replies.

maverick927

Member
Original poster
member
Joined
Aug 2, 2011
Posts
30
Reaction score
0
Points
0
Hi.
I am coding my first bot in C# and having a hard time figuring out onething.
I wanted to fill a form and the form has got date of birth, month of birth and year of birth. I want to select random values for them.
I have used int randomdate = random.Next(1, 28); for date of birth and similar for month and year.
My problem is when the web page loads in the web browser It fills all the fields correctly but int randomdate = random.Next(1, 28); this code keeps on selecting random date and doen't stop.
What should I do to stop this and only select date of birth value once?
Also how can I click on the Radio Button on the form page?
Thank you.

Solved these two problems.
I am now having a new problem with Captcha Image.
I am able to load the Captcha image into a new form with a PictureBox and a Textlabel.
But this new form keeps on popping out with out waiting for me to fill in the Captcha.
I know I can use a timer, but I think that is not the correct solution.
How can I let the bot wait for my input in the textbox on the new form and then take that input and pass it to the corresponding field on the account creation form?
Please help me somebody.
 

theclassic

Old School
old school
member
Joined
Jul 23, 2009
Posts
56
Reaction score
0
Points
5
Age
37
Use a Background worker to display the new form.

To pass the info back you need to invoke the corresponding method with the required info.
 

maverick927

Member
Original poster
member
Joined
Aug 2, 2011
Posts
30
Reaction score
0
Points
0
Hey thanks for stopping by and helping me.
I sorted it out just a while back. Now it is working perfectly.
 
Status
Not open for further replies.