StarCraft 2 Beta
Just noticed today that I’m invited to the StarCraft 2 Beta :>
Gonna install and test it tomorrow.
New Project?
New project ideas?
Linux version of the Matrix screensaver? Or actually doing something with my domains?
Any ideas? ;P
Doubt many will actually comment…. but whatever xD
Matrix Screensaver
So… How do you make yourself a simple “matrix” screensaver for Winblows?
Well, simple just type the following code in any text editor and save as something.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <iostream> #include <cstdlib> #include <windows.h> #define SYSCLEAR "cls" #define color system("color 0a") using std::cout; int main(){ system(SYSCLEAR); bool quit = false; int randomnumber = 1; int digit = 1; color; keybd_event(VK_MENU,0x36,0,0); keybd_event(VK_RETURN,0x1c,0,0); keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0); keybd_event(VK_MENU,0x36,KEYEVENTF_KEYUP,0); do { for(int i = 0;;i++) { for(int j = 0; j < randomnumber; j++) { cout << " "; } digit = rand() % 2; randomnumber = 1 + (rand() % 10); cout << digit; } } while (!quit); return 0; } |
Then just compile it. If you don’t have a compiler, be free to use CrAZzY’s online compiler, kompilator.se.
When you are done, just edit the file extension to .scr and put it in your Windows folder. After that you simply select it in the screensaver selection.
It should now all be done.
What it really does, for those unable to understand the code, is opening a command prompt and generate a random number of spaces between a mix of 0 and 1. It also simulates an ALT+Enter keypress to maximize the window.





