Help I got stuck. I want to make a auto clicker for "cookie clicker 2". You know. I love cookies and I want them fast :P..... soooo I wrote this script:
import win32api, win32con, win32gui
import random
import time
import os
menu = []
mouseClick = []
stop = []
x = []
y = []
def menu():
x = input("Geef de X as op >> ")
y = input("Geef de Y as op >> ")
mouseClick()
def mouseClick():
win32api.SetCursorPos((x,y,))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
time.sleep(.1)
stop()
mouseClick()
def stop():
exit = win32api.mouse_event(win32con.MOUSEEVENTF_MOVE,1,1)
if exit:
menu()
menu()
I got the following Debug Message:
Traceback (most recent call last):
File "" """File Location """ \Click Module.py", line 31, in <module>
menu()
File "" """File Location """ \Click Module.py", line 14, in menu
mouseClick()
File " """File Location """ \Click Module.py", line 17, in mouseClick
win32api.SetCursorPos((x,y,))
TypeError: an integer is required
Please save my day and give me cookies <3