明天可以自动签到啦!!!

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

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

 

#include<windows.h>
#include<stdlib.h>

int _tmain(int argc, _TCHAR* argv[])
{
    System("taskkill /f /im qqbrowser.exe");
    System("C:\Program Files\Internet Explorer\iexplore.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

 

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

posted @ 2015-11-13 22:16  Nagihiko  阅读(168)  评论(0编辑  收藏  举报