Advertisement
mathiasbk

Pokebot pokeall

May 9th, 2011
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. private void pokeall_Click(object sender, EventArgs e)  //pokes all friends on facebook
  2.         {
  3.  
  4.             webBrowser1.Navigate("http://www.facebook.com/friends/edit/");
  5.             Thread.Sleep(2000);
  6.             findfriends();
  7.         }
  8.  
  9. private void findfriends()
  10.         {
  11.             foreach (HtmlElement element in this.webBrowser1.Document.GetElementsByTagName("li"))
  12.             {
  13.                 if (element.GetAttribute("data-label").Equals("All Friends"))
  14.                 {
  15.                     element.InvokeMember("click");
  16.                     label4.Text = webBrowser1.Url.ToString();
  17.                 }
  18.             }
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement