Пример #1
0
        private void btnCheckBlackList_Click(object sender, EventArgs e)
        {
            Random rand    = new Random();
            String hWnd    = au3.WinGetHandle("[TITLE:VIP72 Socks Client]");
            String hwndSTR = "[HANDLE:" + hWnd.ToString() + "]";

            au3.WinSetOnTop(hwndSTR, "", 1);
            int x = au3.WinGetPosX(hwndSTR, "") + 8;
            int y = au3.WinGetPosY(hwndSTR, "") + 30;

            x += au3.ControlGetPosX(hwndSTR, "", "[ID:116]");
            y += au3.ControlGetPosY(hwndSTR, "", "[ID:116]");
            int maxRand = rand.Next(14);

            au3.MouseClick("LEFT", x + 11, y + 30);
            au3.MouseClick("RIGHT", x + 11, y + 30 + maxRand * 17);
            //au3.MouseClick("RIGHT", x + 11, y + 30 + maxRand * 20);
            //au3.ControlClick(hwndSTR, "", "[ID:116]", "left", 1, 57, 35);
            //au3.ControlClick(hwndSTR, "", "[ID:116]", "right", 1, 11,  30 + maxRand * 18);
            au3.Send("{DOWN}");
            au3.Send("{DOWN}");
            au3.Send("{DOWN}");
            au3.Send("{DOWN}");
            au3.Send("{ENTER}");
            Boolean checkNotBlackist = waitText(au3, "[ACTIVE]", "[ID:33]", "is NOT black", "is BLACKLISTED", 30);

            au3.ControlClick("[ACTIVE]", "", "[ID:99]");
            if (checkNotBlackist)
            {
                au3.MouseClick("LEFT", x + 11, y + 30 + maxRand * 17, 2);
            }

            // MessageBox.Show("Login Success: " + checkNotBlackist);
            au3.WinSetOnTop(hwndSTR, "", 0);
        }
Пример #2
0
        public void clearAllProxy()
        {
            au3.WinSetOnTop(hwndSTR, "", 1);
            int x = au3.WinGetPosX(hwndSTR, "") + 8;
            int y = au3.WinGetPosY(hwndSTR, "") + 30;

            x += au3.ControlGetPosX(hwndSTR, "", "[ID:117]");
            y += au3.ControlGetPosY(hwndSTR, "", "[ID:117]");
            au3.ControlClick(hwndSTR, "", "[ID:7303]");
            au3.MouseClick("LEFT", x + 11, y + 30);
            for (int i = 0; i < 50; i++)
            {
                au3.ControlSend(hwndSTR, "", "[ID:117]", "{DEL}");
            }
            au3.WinSetOnTop(hwndSTR, "", 0);
        }