Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

How to use PatBlt in 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
Comment

PREVIOUS NEXT
Code Example
Python :: python sqlalchemy engine 
Python :: overlapping date matplotlib 
Python :: streamlit st.file_uploader 
Python :: remove duplicates from list python preserve order 
Python :: how to create text file with python and store a dictionary 
Python :: gdscript 2d movement 
Python :: rename one dataframe column python 
Python :: pyspark correlation between multiple columns 
Python :: aioschedule python 
Python :: onlt int validator qt py 
Python :: how to python hack 2021 course 
Python :: get all paragraph tags beautifulsoup 
Python :: print no new line python 
Python :: sklearn fit pandas dataframe 
Python :: open mat file in python 
Python :: removing odd index character of a given string in python 
Python :: python 3 of 4 conditions true 
Python :: how to check if user is using main file or importing the file and using in python 
Python :: triangle pattern in python 
Python :: python custom array sort 
Python :: get number of bits on integer in python 
Python :: print without changing line python 
Python :: matplotlib Savefig cuts off title 
Python :: plotly not showing in colab 
Python :: django getting started 
Python :: how to print not equal to in python 
Python :: python conditional assignment 
Python :: python check is admin 
Python :: pandas convert all string columns to lowercase 
Python :: positive lookahead regex python 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =