-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


[ ] Google Chrome

, 11 2017 . 00:12 +
, - Google Chrome. , , - , .

image

. , , , .

image

, . 775x250. 1 . , 19201080 21.5" , .
VS.

.

        public static int x = 775;
        public static int y = 250;

DLL .

        [DllImport("user32.dll")]
        public static extern IntPtr GetDC(IntPtr hwnd);

        [DllImport("user32.dll")]
        public static extern int ReleaseDC(IntPtr hwnd, IntPtr hDC);

        [DllImport("gdi32.dll")]
        public static extern uint GetPixel(IntPtr hDC, int x, int y);

,

IntPtr hDC = GetDC(IntPtr.Zero);
            while (true)
            {
                uint pixel = GetPixel(hDC, x, y);
                if (pixel == 5460819)
                {
                    SendKeys.SendWait("{UP}");
                }
            }

.

if (pixel == 5460819)

, Decimal, .

SendKeys.SendWait("{UP}");

2 .

using System.Diagnostics;
using System.Windows.Forms;

500 , . . !

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows.Forms;

namespace DragonChrome
{
    class Program
    {
        #region VAR
        public static int x = 775;
        public static int y = 250;

        #endregion
        #region DLL
        [DllImport("user32.dll")]
        public static extern IntPtr GetDC(IntPtr hwnd);

        [DllImport("user32.dll")]
        public static extern int ReleaseDC(IntPtr hwnd, IntPtr hDC);

        [DllImport("gdi32.dll")]
        public static extern uint GetPixel(IntPtr hDC, int x, int y);

        #endregion
        static void Main(string[] args)
        {
            IntPtr hDC = GetDC(IntPtr.Zero);
            while (true)
            {
                uint pixel = GetPixel(hDC, Convert.ToInt32(x), y);
                if (pixel == 5460819)
                {
                    SendKeys.SendWait("{UP}");
                }
            }
        }
    }
}

Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/330672/


: [1] []
 

:
: 

: ( )

:

  URL