Python PyAutoGUI Script to Keep your PC Alive Forever and Awake it Automatically by Mouse Click or Keyboard and Prevent it From Sleeping Full Project For Beginners

You are currently viewing Python PyAutoGUI Script to Keep your PC Alive Forever and Awake it Automatically by Mouse Click or Keyboard and Prevent it From Sleeping Full Project For Beginners

 

Welcome folks today in this blog post we will be preventing our pc from sleeping and awaking it automatically using pyautogui library in python. All the full source code of the application is given below.

 

 

Get Started

 

 

In order to get started you need to install the following library using the pip command as shown below

 

pip install pyautogui

 

After installing this library make an app.py file and copy paste the following code

 

app.py

 

 

 

And now if you execute the above script by typing the below command

 

python app.py

 

Now if you execute this after some time you haven’t done anything on your pc with your mouse and keyboard this will automatically move your mouse after a specified amount of time

 

Leave a Reply