zoukankan      html  css  js  c++  java
  • 明天可以自动签到啦!!!

    哈哈,记得以前听成哥提到过,利用程序打开网页,还有控制鼠标键盘的操作,哈哈,其实就是调用win32API啦    $_$

    废话不多说,代码来了。。

    #include<windows.h>
    #include<stdlib.h>
    
    int _tmain(int argc, _TCHAR* argv[])
    {
        System("taskkill /f /im qqbrowser.exe");
        System("C:Program FilesInternet Exploreriexplore.exe");
        Sleep(3 * 1000);
        ShellExecuteA(0, "open", "https://www.ctguqmx.com/", 0, 0, 3);
        Sleep(3*1000);
        SetCursorPos(1150, 130);
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        Sleep(3 * 1000);
        SetCursorPos(900, 480);
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        Sleep(3 * 1000);
        SetCursorPos(700, 280);
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        Sleep(3 * 1000);
        SetCursorPos(1100, 130);
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        Sleep(3 * 1000);
        SetCursorPos(90, 200);
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        return 0;
    }

    其中有个问题,就是QQ浏览器在程序控制打开时,不会满屏,这样子就有点麻烦了哦。

    不过,百度下,参考这个就OK了,哈哈——>  http://blog.sina.com.cn/s/blog_8b882f6e0101apad.html

    然而并不行,以后再想其他更靠谱的方法吧。。。。。。。。

  • 相关阅读:
    AGC044D Guess the Password
    CF1290E Cartesian Tree
    loj2537. 「PKUWC2018」Minimax
    loj3166. 「CEOI2019」魔法树
    CF702F T-Shirts
    CF1260F Colored Tree
    CF1340F Nastya and CBS
    CF1017G The Tree
    CF150E Freezing with Style
    前端开发 -- HTML
  • 原文地址:https://www.cnblogs.com/fengyanlover/p/4963388.html
Copyright © 2011-2022 走看看