In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Today, I will talk to you about the use and installation of the python programming PyAutoGUI library, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
Python's PyAutoGUI library is a good choice.
First download PyAutoGUI according to the following URL
Https://pypi.org/project/PyAutoGUI/
Because the IDE of the python I am using is Pycharm, enter the following code in the terminal of Pycharm:
Pip install PyAutoGUI
Installation succeeded ~ ~
Then import the PyAutoGUI in the project interprer of Pycharm's setting. If it is not found, it should not be imported and can be used directly.
Here's a small example: import pyautogui as pgimport time# closes the python interface pg.moveTo (3650) pg.click () # the python interface that runs the script pg.moveTo (3570) pg.click () time.sleep (2) # closes the python interface pg.moveTo (3650L10) pg.click () # imports the script pg.moveTo (2400410) pg.rightClick () pg.moveTo (2500700) pg.click () # selects the script pg.moveTo (1200300) pg.click ( ) pg.moveTo (1200980) pg.click () # pause time.sleep (1) # drag the global variable pg.moveTo (3100300) time.sleep (1) pg.drag -70 dint durationkeeper 2) # start playing pg.moveTo (1830 pr 97) pg.click ()
Among them
Pg.click () stands for clicking the mouse
Pg.moveTo stands for moving to a location on the computer screen.
The function of the time library is to delay mouse or keyboard operation.
Pg.drag (xrecoery ytime duration = …) Used to achieve mouse drag and drop operation.
Keyboard function transfer interested children's shoes can be Baidu, with the above functions, a while cycle, just a few words you can use the computer to chat with friends automatically (although only a few fixed words, ), and then I use this to achieve an automatic drag and drop the mouse, help me save files and run small scripts for the project, liberate my hands and watch the completion speed of the computer It's more than twice as fast as my hands. In short, python-> nb~ video results show:
PyAutoGUI usage demonstration
After reading the above, do you have any further understanding of the use and installation of python programming PyAutoGUI libraries? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.