macro_cf

 avatar
Fry
c_cpp
a year ago
887 B
206
Indexable
#include <iostream>
#include <Windows.h>
#include <stdio.h>
#include <iostream>
#include <thread>
#include <chrono>

int init() {
    HMODULE hinst =NULL;
    if (hinst == nullptr)
    {
        return -1;
    }

    if (check_cai_gi_do)
    {
        int st = dd_btn(0);
        if (st == 1) {
            return 1;
        }
    }
    else {
        return -2;
    }
}
                                                
int main()
{
    init();
    
    while (true)
    {
        while (GetAsyncKeyState(VK_LBUTTON) & 0x8000)
        {
            std::cout << "send click\n";
            mouseclick(1);         //1==L.down, 2==L.up, 4==R.down, 8==R.up, 16==M.down, 32==M.up
            Sleep(8);
            mouseclick(2);
            //delay 25ms
            Sleep(25);
        }
    }           


    std::cout << "Hello World!\n";
}
Editor is loading...
Leave a Comment