#!/usr/bin/env python
# coding: utf-8
# # Mouse and keyboard automation using Python
# In[31]:
import pyautogui
print(pyautogui.size())
# In[32]:
#moveTo(): use this function to move the mouse in pyautogui module.
pyautogui.moveTo(100, 100, duration = 5)
# In[33]:
#moveRel() function: moves the mouse pointer relative to its previous position.
pyautogui.moveRel(0, 50, duration = 5)
# In[34]:
#position(): function to get current position of the mouse pointer.
print(pyautogui.position())
# In[35]:
#click(): Function used for clicking and dragging the mouse.
pyautogui.click(100, 1000)
# In[36]:
#clcoding.com
0 Comments:
Post a Comment