Hello everyone and welcome back! Today we are making some VERY simple python bots that you can use to automate the basic stuff in your life or even pwn games like cookie clicker or even more ! This video is simple on purpose as it is an introduction for further learning (for example with selenium and Python). Thank you so much for visiting and have a nice day.
im using python 3.10
commands:
pip install (module name)
do this for every module :
time
keyboard
win32api
win32con
pyautogui
PIL
some of these come preinstalled so dont worry 🙂
Then once you installed that you are ready !
HINT FOR THOSE OF YOU WHO HAVE MULTIPLE PYTHON VERSIONS INSTALLED :
use:
py -3.7 -m pip install
(instead of only “pip install ” )
for python 3.7 to install a module
easy as that
First script (Autorefresh.py) :
#https://orteil.dashnet.org/cookieclicker/
import time
import keyboard
import win32api, win32con
import pyautogui
#to find X and Y
#import pyautogui, PIL
#pyautogui.displayMousePosition()
def clickplace(x,y):
win32api.SetCursorPos((x,y))
#keyboard.press_and_release('f5')
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
time.sleep(0.001)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
print("Started the script... Press q to stop")
while keyboard.is_pressed('q') == False:
clickplace(297,546)
#click where the refresh button is
#print("Done, sleeping for 5s")
#time.sleep(5)
Second script (holdkey.py) :
import time
import keyboard
import win32api, win32con
import pyautogui
#to find X and Y
#import pyautogui, PIL
#pyautogui.displayMousePosition()
print("Mining...")
key = "k"
#win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
#win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
while True:
pyautogui.keyDown(key)
pyautogui.keyUp(key)
print("Done.")
Third script (CookieClicker game Pwned) (bot.py):
#https://orteil.dashnet.org/cookieclicker/
import time
import keyboard
import win32api, win32con
import pyautogui
#to find X and Y
#import pyautogui, PIL
#pyautogui.displayMousePosition()
def clickplace(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
time.sleep(0.001)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
print("Started the script... Press q to stop")
while keyboard.is_pressed('q') == False:
clickplace(1135,217)
Video URL: https://www.youtube.com/watch?v=GhFtEPVWGNo