Advertisement
diopralinato

macro for game

Jan 23rd, 2012
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. private void button1_Click(object sender, EventArgs e)
  2. {
  3.     // Find The Window Handle For Lineage 2
  4.     IntPtr handle = FindWindow("L2UnrealWWindowsViewportWindow", "Lineage II");
  5.     if (!handle.Equals(IntPtr.Zero))
  6.     {
  7.  
  8.         // Activate The Lineage 2 Window
  9.         if (SetForegroundWindow(handle))
  10.  
  11.             // send "Send The TextBox Text To The Lineage 2 Window"
  12.             SendKeys.SendWait(Username.Text);
  13.             SendKeys.SendWait("{TAB}");
  14.             SendKeys.SendWait(Password.Text);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement