Como usar o PATBLT em Python

#make sure you have pywin32 installed(pip install pywin32) type that in command prompt

from win32gui import*
from win32api import*
from win32ui import*
from win32con import*
from random import*

desk = GetDC(0) #get the frist monitor and stores it in our desk variable
y = GetSystemMetrics(0)
x = GetSystemMetrics(1)

for i in range(0, 100):
  PatBlt(desk, randrange(x), randrange(y), randrange(x), randrange(y), WHITENESS)
  Sleep(10)
ReleaseDC(desk, GetDesktopWindow())
DeleteDC(desk)



#Thats it. Dont run this on your main pc
Jeppe Pro