Notes on pyautogui , a module for keyboard and Mouse functions

pyautogui is a python module to automate keyboard and mouse actions. I found this very interesting and creepy too ! :).

Here are few things to 📝 note,

Sample Script

Open a application in taskbar and close it using mouse clicks. —> move cursor on application, then in python3.x console run the following code and —> Note position of application in taskbar —> note position of “close” button

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyautogui
>>> pyautogui.position()
Point(x=396, y=591)
Point(x=1884, y=0)

Simple Python code to open and close application (very basic :) )

import pyautogui
decision = 'OK'
while (decision == "OK"):, y=1048, clicks=1, button='left', duration=3), y=21, clicks=1, button='left', duration=3)
	decision = pyautogui.confirm ('Should I continue ?')

— By Fabian Darius