Пример #1
0
        static void DoMouseClick()
        {
            //Call the imported function with the cursor's current position
            uint X = (uint)Cursor.Position.X;
            uint Y = (uint)Cursor.Position.Y;

            //mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, X, Y, 0, 0);
            ExternalWrapper.LeftClickMouse(X, Y);
            string d = DateTime.Now.ToString("HH:mm:ss ff");

            Console.Out.WriteLine(d + "   x=" + X + " y=" + Y);
        }
Пример #2
0
        static void derp()
        {
            using (Bitmap bmp = ExternalWrapper.GetCursorIcon())
            {
                //Bitmap bmp = new Bitmap(32, 32);

                //if (false)
                //   using (Form form = new Form())
                //   {
                //      form.StartPosition = FormStartPosition.CenterScreen;
                //      form.Size = bmp.Size;

                //      PictureBox pb = new PictureBox();
                //      pb.Dock = DockStyle.Fill;
                //      pb.Image = bmp;

                //      form.Controls.Add(pb);
                //      form.ShowDialog();
                //   }

                string hash = "";
                hash = getHash(bmp);

                if (!hashes.Contains(hash))
                {
                    hashes.Add(hash);
                    Console.WriteLine(hash);
                    bmp.Save(Path.Combine(cwd, hash + ".bmp"));
                }

                if (comboHashes.Contains(hash))
                {
                    DoMouseClick();
                    Thread.Sleep(200);
                }
            }
        }