├── coordinates.png ├── texttoconvert.png ├── Keyboard.py ├── MouseDrag.py ├── README.md ├── Coordinates.py └── Number Recognition 1.py /coordinates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KianBrose/Python-botting-butorial-part-2/HEAD/coordinates.png -------------------------------------------------------------------------------- /texttoconvert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KianBrose/Python-botting-butorial-part-2/HEAD/texttoconvert.png -------------------------------------------------------------------------------- /Keyboard.py: -------------------------------------------------------------------------------- 1 | import keyboard 2 | import pyautogui 3 | import win32api, win32con 4 | 5 | 6 | while 1: 7 | keyboard.wait('esc') 8 | mystring = "My name is jeff" 9 | keyboard.write(mystring) 10 | keyboard.press_and_release('enter') 11 | -------------------------------------------------------------------------------- /MouseDrag.py: -------------------------------------------------------------------------------- 1 | import time 2 | import keyboard 3 | import win32api, win32con 4 | 5 | time.sleep(2) 6 | 7 | win32api.SetCursorPos((500,500)) 8 | time.sleep(0.1) 9 | win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0) 10 | time.sleep(0.1) 11 | win32api.SetCursorPos((500,300)) 12 | time.sleep(0.1) 13 | win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0) 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python-botting-butorial-part-2 2 | Hello there! This is the github repository where you can find the complete code for the part two of the botting tutorial. This repository will be released before the actual video, so just stay tuned on https://www.youtube.com/user/GamingKian for video release. You can also contact me on discord, just go to the about page on my youtube channel and get the link there. 3 | -------------------------------------------------------------------------------- /Coordinates.py: -------------------------------------------------------------------------------- 1 | import pyautogui 2 | from PIL import Image 3 | from pytesseract import * 4 | pytesseract.tesseract_cmd = r'C:\Users\Antec\AppData\Local\Tesseract-OCR\tesseract.exe' 5 | img = Image.open("coordinates.png") 6 | 7 | output = pytesseract.image_to_string(img) 8 | output = output.split(',') 9 | 10 | total = int(output[0]) + int(output[1]) 11 | print(output[0]) 12 | print(output[1]) 13 | print(total) 14 | #print(output) 15 | #print(len(output)) 16 | -------------------------------------------------------------------------------- /Number Recognition 1.py: -------------------------------------------------------------------------------- 1 | import pyautogui 2 | from PIL import Image 3 | from pytesseract import * 4 | #Note: You have to change the path below to your tesseract.exe location 5 | pytesseract.tesseract_cmd = r'C:\Users\Antec\AppData\Local\Tesseract-OCR\tesseract.exe' 6 | 7 | #This line stores the image texttoconvert.png inside the img variable 8 | img = Image.open("texttoconvert.png") 9 | 10 | #Note: You can use pyautogui to fetch the screenshot instead of fetching it from a file 11 | #img = pyautogui.screenshot(region=(10,10,10,10)) 12 | 13 | #This line uses pytesseract's image_to_string function to convert the image stored in the variable (img) into a string (text) that will be stored in the (output variable) 14 | output = pytesseract.image_to_string(img) 15 | 16 | #We can now print out the output 17 | print(output) 18 | 19 | #output = output.split(',') 20 | #print(output[0]) 21 | #print(output[1]) 22 | #print(output) 23 | #print(len(output)) 24 | --------------------------------------------------------------------------------