Articles → PyAutoGUI → Click function in pyautogui

Click function in pyautogui






Purpose





Example


import pyautogui

pyautogui.moveTo(700,500)

pyautogui.click()



Output


Picture showing the output of the click function in pyautogui

Click to Enlarge


Specifying coordinates in click function






import pyautogui

pyautogui.click(700,500)





Clicks attribute




import pyautogui
pyautogui.click(clicks=2)




Picture showing the output of the Clicks attribute in the click function

Click to Enlarge


Interval attribute in click function






import pyautogui

pyautogui.click(700, 500,clicks=2, interval=0.25)





Button attribute in click function












import pyautogui

pyautogui.click(button='right')




Picture showing the context menu opened using the click function in pyautogui

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, May 21, 2019
 
Updated On  -  Wednesday, May 29, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250