0

I'm trying to make a background auto clicker for FiveM, so that I can click in the background while im browsing YouTube.

This is the code i came up with but it doesn't work.

import win32
import win32gui
import win32api
import win32con
def click(x, y):
    hWnd = win32gui.FindWindow(None, "FiveM")
    lParam = win32api.MAKELONG(x, y)

    hWnd1= win32gui.FindWindowEx(hWnd, None, None, None)
    win32gui.SendMessage(hWnd1, win32con.WM_LBUTTONDOWN, win32con.MK_LBUTTON, lParam)
    win32gui.SendMessage(hWnd1, win32con.WM_LBUTTONUP, None, lParam)

click(100,100)

I think it just doesn't find the window.

I expected it to find the window and start clicking but nothing happened

toyota Supra
  • 3,181
  • 4
  • 15
  • 19

0 Answers0