WilliamHarlow

my own 2 year old code have to debug (autoclicker)

Aug 25th, 2021
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. #include <iostream>
  2. #include <Windows.h>
  3. #include <string>
  4. using namespace std;
  5. /* colors for rainbow
  6. 0 = Black
  7. 1 = Blue
  8. 2 = Green
  9. 3 = Aqua
  10. 4 = Red
  11. 5 = Purple
  12. 6 = Yellow
  13. 7 = White
  14. 8 = Gray
  15. 9 = Light Blue
  16. A = Light Green
  17. B = Light Aqua
  18. C = Light Red
  19. D = Light Purple
  20. E = Light Yellow
  21. F = Bright White
  22. 7 = F = bright white white
  23. system("color 02");For example, this is black green words
  24.  
  25. so
  26.  
  27. 84
  28. 86
  29. 82
  30. 81
  31. 83
  32. 85
  33. 87
  34.  
  35.  
  36.  
  37. */
  38. int x = 0, y = 0, cps;
  39. bool click = false;
  40. string rl;
  41.  
  42. //add randomzier
  43.  
  44.  
  45. void BootMenu()
  46. {
  47. cout << " oOOOOo oOOo .o000o. .o000o. .oOOOo. \n";
  48. cout << "OO OO OOOO OO OO OO OO OO OO \n";
  49. cout << "OO .o OOOO OO OO OO OO OO OO \n";
  50. cout << "OO.oo OOOO OO OO OO OO OO OO \n";
  51. cout << "OO.oo OOOO OO OO OO OO OOoOoO \n";
  52. cout << "OO o. OOOO OO OO OO OO OO \n";
  53. cout << "OO OO OOOO OO OO OO OO OO \n";
  54. cout << "OO Oo OOOO OO OO OO OO OO \n";
  55. cout << " oOOOOo OOOO OooooO OoooO OO \n";
  56.  
  57. cout << "\n \n \n";
  58. cout << " " << endl;
  59. cout << " " << endl;
  60. cout << "Booting up Bloopclicker ";
  61.  
  62. system("color 02");
  63.  
  64.  
  65. char Onkey;
  66. char Offkey;
  67.  
  68. }
  69. void Onoff() {
  70. cout << "State on key (must be a character) : ";
  71. cin << Onkey;
  72. cout << "On key is: '";
  73. cout << Onkey;
  74. cout << "'!";
  75. cout << "State off key (must be a character) : ";
  76. cin << Offkey;
  77. cout << "Off key is: '";
  78. cout << Offkey;
  79. cout << "'!";
  80. }
  81.  
  82.  
  83. // this is a fucking mess jesus christ i should stop working on this right now.
  84.  
  85. void LeftClicker() {
  86. cout << "'";
  87. cout << Onkey;
  88. cout << "' turns clicker on, '";
  89. cout << Offkey;
  90. cout << "' turns the clicker off.";
  91. cin >> cps;
  92.  
  93. while (1) {
  94. if (GetAsyncKeyState(Onkey))
  95. {
  96. click = true;
  97. }
  98. if (GetAsyncKeyState(Offkey))
  99. {
  100. click = false;
  101. }
  102. if (click == true)
  103. {
  104.  
  105. mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
  106. mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
  107. Sleep(1000 / cps); //randomizes cps with tickspeed of the computer so it doesnt flag as easily
  108. }
  109. }
  110. }
  111.  
  112. void RightClicker() {
  113. cout << "'";
  114. cout << Onkey;
  115. cout << "' turns clicker on, '";
  116. cout << Offkey;
  117. cout << "' turns the clicker off.";
  118. cin >> cps;
  119. while (1) {
  120. if (GetAsyncKeyState(Onkey))
  121. {
  122. click = true;
  123. }
  124. if (GetAsyncKeyState(Offkey))
  125. {
  126. click = false;
  127. }
  128. if (click == true)
  129. {
  130.  
  131. mouse_event(MOUSEEVENTF_RIGHTDOWN, x, y, 0, 0);
  132. mouse_event(MOUSEEVENTF_RIGHTUP, x, y, 0, 0);
  133. Sleep(1000 / cps);
  134. }
  135. }
  136. }
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. void Rl() {
  150.  
  151. cout << "Right or Left Clicker? \n";
  152. cin >> rl;
  153. if (rl == "Left", "left", "l") {
  154.  
  155. cout << "\n Add cps \n>>";
  156. cin << cps;
  157.  
  158. }
  159. else {
  160. cout << "Right it is! \n";
  161. cout << "Add cps \n>>";
  162. cin << cps;
  163. }
  164. }
  165.  
  166. int main()
  167. {
  168. BootMenu();
  169. Rl();
  170.  
  171. }
Add Comment
Please, Sign In to add comment