Advertisement
mathiasbk

Untitled

Apr 26th, 2011
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace pokebot
  11. {
  12.     public partial class Form1 : Form
  13.     {
  14.         public Form1()
  15.         {
  16.             InitializeComponent();
  17.         }
  18.  
  19.         bool _newSearchFlag = true;
  20.        
  21.         private void Form1_Load(object sender, EventArgs e)
  22.         {
  23.             webBrowser1.Navigate("http://facebook.com");
  24.         }
  25.        
  26.         private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
  27.         {
  28.             HtmlElementCollection links = webBrowser1.Document.GetElementsByTagName("a");
  29.  
  30.             foreach (HtmlElement link in links)
  31.             {
  32.                 if (link.InnerText.Equals("Poke tilbake"))
  33.                     link.InvokeMember("Click");
  34.             }
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement