Saturday, 9 January 2016

Automatic login to website-2


I want to Create a button once i click it The user canlogin automatically login certain website like "Facebook" by stored user name and password in text file 

I make search and came up with this simple code but it not work!!

can any one Explain the problem!!



------------------------------------------------------------------------------------------------------------------



<pre lang="c#">
 
private void button2_Click(object sender, EventArgs e)
  {
     System.Diagnostics.Process.Start("http://www.facebook.com/");
 
     int flag = 1;
 
     while (flag == 1)
 
     {
 

       SendKeys.Send("Username.Txt");
 
       SendKeys.Send("{TAB}");
 
       SendKeys.Send("Password.Txt");
 
       SendKeys.Send("{TAB}");
 
       SendKeys.Send("{ENTER}");
 
       flag = flag + 1;
 
     }
 
 
}

No comments:

Post a Comment