• 个人简介

    听说挺好用 #include<bits/stdc++.h> #include<windows.h> #include<tlhelp32.h> using namespace std; bool getProcess(const char *procressName) { char pName[MAX_PATH]; strcpy(pName,procressName); CharLowerBuff(pName,MAX_PATH); PROCESSENTRY32 currentProcess; currentProcess.dwSize = sizeof(currentProcess); HANDLE hProcess = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); if (hProcess == INVALID_HANDLE_VALUE) { return false; } bool bMore=Process32First(hProcess,&currentProcess); while(bMore) { CharLowerBuff(currentProcess.szExeFile,MAX_PATH); if (strcmp(currentProcess.szExeFile,pName)==0) { CloseHandle(hProcess); return true; } bMore=Process32Next(hProcess,&currentProcess); } CloseHandle(hProcess); return false; } int main() { HWND h = GetConsoleWindow(); HWND small[1009] = {}; int s_i = 0; ShowWindow(h,SW_HIDE); int b_n = 0; while(true) { if(GetAsyncKeyState(18) && GetAsyncKeyState(66)) { s_i++; small[s_i] = GetForegroundWindow(); ShowWindow(small[s_i],SW_HIDE); } if(GetAsyncKeyState(18) && GetAsyncKeyState(78)) { if(s_i >= 1) { ShowWindow(small[s_i],SW_SHOWNORMAL); small[s_i] = NULL; s_i--; } } if(GetAsyncKeyState(18) && GetAsyncKeyState(72)) { if(b_n == 0) { keybd_event(VK_CONTROL,0,0,0); Sleep(50); keybd_event(VK_LWIN,0,0,0); Sleep(50); keybd_event(68,0,0,0); Sleep(50); keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_LWIN,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(68,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_CONTROL,0,0,0); Sleep(50); keybd_event(VK_LWIN,0,0,0); Sleep(50); keybd_event(VK_RIGHT,0,0,0); Sleep(50); keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_LWIN,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_RIGHT,0,KEYEVENTF_KEYUP,0); Sleep(50); b_n = 1; } else if(b_n == 1) { keybd_event(VK_CONTROL,0,0,0); Sleep(50); keybd_event(VK_LWIN,0,0,0); Sleep(50); keybd_event(VK_LEFT,0,0,0); Sleep(50); keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_LWIN,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_LEFT,0,0,0); b_n = 2; } else { keybd_event(VK_CONTROL,0,0,0); Sleep(50); keybd_event(VK_LWIN,0,0,0); Sleep(50); keybd_event(VK_RIGHT,0,0,0); Sleep(50); keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_LWIN,0,KEYEVENTF_KEYUP,0); Sleep(50); keybd_event(VK_RIGHT,0,KEYEVENTF_KEYUP,0); Sleep(50); b_n = 1; } } for(int i = 1; i <= s_i; i++) { ShowWindow(small[i],SW_HIDE); } Sleep(100); } return 0; }

  • 最近活动