I'm trying to make a bot that automatically moves the mouse to a specific location. Only problem now is that the function was global, but now isn't anymore for some reason.
import mouse
import configparser
import win32api
hexstring = config.get("keypress", "keypress")
an_int = int(hexstring, 16)
if win32api.GetAsyncKeyState(an_int) < 0:
mouse._os_mouse.move_relative(int(xcoord), int(ycoord))
I found the error. I just needed to open the application as an administrator.