Example #1
0
        public frmGUI()
        {
            AutoItX3Declarations.AU3_Opt("SendKeyDownDelay", 100);

            myDelegate = hookFunction;

            InitializeComponent();
            rdbInjectManually.Checked = false;
            btnInject.Enabled         = false;

            foreach (Process p in Process.GetProcesses())
            {
                if (p.ProcessName == "League of Legends")
                {
                    if (Injector.AlreadyInjected(p, Directory.GetCurrentDirectory() + "\\" + dllName))
                    {
                        new Thread(delegate()
                        {
                            Thread.Sleep(100);
                            AfterInject();
                        }).Start();
                    }
                    break;
                }
            }

            modules = new List <Module>();
            modules.Add(new AutoLaugh(Keys.F9, 5, 5));
            modules.Add(new AutoSmite(Keys.F8, 5, 25, rdbSmiteF.Checked ? "F" : "D"));
            modules.Add(new IgniteIndicator(Keys.F7, 5, 45));
            modules.Add(new WardRevealer(Keys.F6, 5, 65));
            modules.Add(new CloneDetector(Keys.F5, 5, 85));

            hookPtr = SetWindowsHookEx(13, myDelegate, IntPtr.Zero, 0); //WH_KEYBOARD_LL=13
            if (hookPtr == IntPtr.Zero)
            {
                MessageBox.Show("Failed to hook");
                Close();
            }
            Console.WriteLine("keyboard hook installed"); //im a hooker yo
        }