nothingmore
Junior Member
- May 1, 2011
- 190
- 219
This is my first project and after a couple days I finally am getting some progress.
Here is my current code right now which I made just to make sure it works and it did. How do I go about making a loop that will grab the ID (which is an assigned user number) and click each time because I would need this to loop 1000+ times.
Here is my current code right now which I made just to make sure it works and it did. How do I go about making a loop that will grab the ID (which is an assigned user number) and click each time because I would need this to loop 1000+ times.
Code:
private void button1_Click_1(object sender, EventArgs e)
{
HtmlDocument doc = webBrowser1.Document;
HtmlElement f1 = doc.GetElementById("user3800");
HtmlElement f2 = doc.GetElementById("user6341");
HtmlElement f3 = doc.GetElementById("user5822");
HtmlElement f4 = doc.GetElementById("user1645");
HtmlElement f5 = doc.GetElementById("user4909");
f1.InvokeMember("click");
f2.InvokeMember("click");
f3.InvokeMember("click");
f4.InvokeMember("click");
f5.InvokeMember("click");
}